I'm testing out a library file I've created (a jar file) . And inside this library, I use an asynctask. I mainly test it with a motorola Atrix 2.3.6. However i've also tested it with a samsung nexus S and a Galaxy tablet, and everything works perfectly.
However, I've tried it on a Xperia 2.3.7 and when I'm debugging I get into the PreExecute() of my Asynctask, but it never even enters the doInBackground(). HOWEVER, I have a second asynctask that is inside of the main activity. (Not from a jar). And that seams to work ok on the Xperia.
There are no error logs, as there are no errors reported, it just simply never gets there.
Something to note, is that this is a rooted phone that has some parts swapped in from another phone. Which might have something to do with it.. But I don't see how.
Any ideas?
I sort of figured out the issue. For some reason the code was just never able to break point.. No idea why. However the code was still being executed, so I was able to move forward. The phone actually had some further compatibility issues which caused the other problems I was seeing which prompted my question.
Related
I am trying to develop an app which auto receive calls from particular numbers.
Like i can add the numbers that i want to auto receive. I did a lot of research and found similar questions but none of them worked. Some codes did work but only upto kitkat version and code did not work on versions above kitkat. I want the code that support all android versions. Its very important for me so please answer quickly. I really need your help.
I want the app to work in background so also please help me and write the code to implement this in a background service.
I was successful to run the app on versions upto kitkat but above kitkat the code does not work.
Android very specifically does NOT allow this, because doing so is an opening to a lot of telephone scams involving reversed charges. They've actually never allowed it, but people found hacks on old versions to get around that. Every time Google finds one of these, they shut it down in the next version. So there is no reliable way to do it, and if you find a way expect it to disappear shortly afterwards.
My project is shared in this GitHub link. Though i did run and test my android app with couple of devices successfully, There is "Stop Working"/"keeps stop running" message in Galaxy S7 Edge. My test cases were Sony xperia Z3 and LG L70.
I tried to send error message to a server via SendError Service while catching exception in try/catch statement but it seems error is out of those statement and user(with S7 edge) reported that the problem has been existed.
So in general form, how can someone find what's wrong with a code while haven't got access to specific device(which error occurs)? obviously i couldn't test my app on every device(nor can i buy S7 Edge just to test my app).
If you saw my code and by chance know which part causing this to happen, please notify me.
Notice: The error occurs in couple of seconds. I guess it happens in StartActivity or MainActivity or VersionUpdate.
Update: I don't have the Log and i can't use Firebase Crash Reports because of Sanctions.
A Few things:
Firstly, do you have some sort of crash reporter embedded into your app? If not, I would recommend using Firebase Crash Reports. this way, you can easily see crash reports and stack traces, as well as device information, which is useful for when your app crashed due to a device-specific crash.
Second, do you have a complete crash log for the Galaxy S7 Edge? If so, please post it here, it would be nearly impossible to help you without the details of the crash
I have a Google Map activity.
when i run it on Api16 emulator, everything looks fine it shows me the map.
But when i run it on Api23 emulator, it shows me a blank screen whith a google logo.
What's the problem?
We really have to see the code to know what the problem is, but it might be a depreciated api. For instance the .getmap has been replaced with getMapAsynce, but you cant just change that word to fix it. read this:
Replace getMap with getMapAsync
So, I just rebuilt my MediaPlayer service from the ground up, mainly to improve and update the code, but also because it just WASN'T going to work with MediaStyle notifications.
So, now I have a notification, and when I press the Pause button, it logs "onPause" although nothing else I have set to log in the onPause is there in the logs, and they all use the same tag, so that's weird.)
What it does though, that really bugs me. It logs that I pressed the right button, but then it just seems to start another mediaplayer and play that.
This is the offending class. The latest debug and release signed APKs can be found in the mobile package if you want to see the behavior for yourself.
Is there something I'm missing in, say, the AndroidManifest.xml? The service seems to be receiving the intent, but just ignoring it, which is weird.
I'm honestly lost. I barely have a grasp on intents or pendingintents, let alone IBinders.
My compiler wasn't working properly. My code was fine. Somewhere between compiling and installing, it used an older version of the APK, or at least one class.
I am trying to debug some code related to ListView on Samsung Captivate (Galaxy S). I put breakpoint somewhere in my code and when it stops I go back on the stack few frames to the ListView source.
Now, I can expect that there would be some mismatch as my phone probably has slightly different version of Android classes than source code that I use in my IDE. However, I get a discrepancy of over 300 lines. I don't see this discrepancy on emulator.
More over, stack trace shows ListView line number 3688 for method performItemClick() while ListView source only has 3644 lines and this method appears in it on line 3395. I looked at different versions of Android code and none of them has performItemClick() much closer to line 3688.
The only explanation I can think of is that Samsung changed Android code so much, but I can't see why would they do such change.
Is there some other reason that I am missing? Is there any way to force debugger to adjust lines automatically as currently I just can't step through this code?
Trying different versions won't help. Samsung modifies their framework code and they do not release the changes. I ran into the same problem with my Samsung Charge smartphone. They probably deal with the Galaxy in the same way. This is an unfortunate reality of the Apache license.
When I contacted Samsung about the issue I got the following response (with minor edits):
FRG83 android-2.2.1_r1 is [the right version number for the Samsung Charge].
Also, ''ListView.java'' file does not match between file on the phone and google original, because we modified it.
ListView.java is covered under Apache license which has no obligation to publish source code.
Please understand that we only publish open source codes that are covered licenses which have obligation of publishing.(ex. GPL, LGPL, MPL...etc).
The reason for mentioning ''Get android open source'' is only for build our Open source code.
It's possible that there are encoding differences that cause the number of carriage returns to vary. Try formatting the source with a single encoding and stripping out the excess line breaks.
I usually find that reading the documentation is more productive than stepping through 3rd party code if you want to understand it. Especially with big frameworks. There is also a good video on ListView that I would recommend.
That being said, sometimes even after you've read the documentation it still doesn't make sense and seeing it for real can help. The first thing to do is find out exactly which version you do have on your phone:
my phone probably has slightly different version of Android
and make sure your Android source code attached to eclipse is the same version. If the Android guys added new APIs to ListView it is perceivable that it could jump in size.
I, too, would be very surprised if Samsung modified these files.