Reputation: 11071
I am writing an android app and testing in on my own phone. It's working properly except that sometimes after I click the icon, the app shows up for half a second and then closes. The weird things are:
Following are my configuration settings:
I suspect the problem might have something to do with the OS version or even device type. Has anyone experienced this problem before? The app is still OK to use, but this is a really bad user experience.
Thanks,
I attached my phone to Logcat as suggested, but it just got weirder. When the app is running, I can see the log is updating and everything is fine. When it crashes, all the log information in Logcat console is gone. There is only one line with tag “WindowManager” left saying:
"Delivering key 4 to Window{ ...}"
And the time column is changing quickly. I assume it means I am keep pressing cancel button, which I am not. Does anyone has experience with this?
Thanks,
Upvotes: 0
Views: 18095
Reputation: 1
Went to developer options ,Under applications , do not keep activities-turned off .Tried camera settings ,page came out and stayed as it should -Hope this helps , DB
Upvotes: -1
Reputation: 11071
I have tried everything I could think of:
I added System.gc() on start and quit, I added Systme.exit(0) on quit, and I added "kill process" on quit.
Unfortunately none of those worked. After talking to a few friends now I believe it's the problem is caused by Samsung I9000S with their version of Android 2.1 Update 1. Once updated to 2.2, the problem is gone.
Upvotes: 0
Reputation: 4207
Your app may not be resuming properly. When you leave the app and do something else, the app is restarted from scratch. When you leave and immediately come back, the app is resumed.
Check out the flowchart at http://developer.android.com/reference/android/app/Activity.html
Also, I'd like to re-iterate Cristian's comment. Please post a stack trace of the crash.
Upvotes: 3