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:
- It only happens about once in 20 times.
- When it crashes, if you try to re-open the app it will crash too. You have to do something else (like using another app) before you can open the app normally.
- When it crashes, if you try to open some other cheap apps they will crash too. (But not those decent ones like “Angry Bird”)
Following are my configuration settings:
- The app is written in Android 1.6. (A survey says there are still 30% Android phones are on 1.6, so I chose the lowest version possible.)
- The OS version on my phone is Android 2.1
- My phone is Samsung Galaxy I9000
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,
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.