0

I have launched an app on Google Market, but when people open it directly from the Market App after installing, everything crashes. The market app force-closes and you are dropped back to the main screen.

But when my app is started from the main screen, everything works fine. I cannot find a solution to this, neither find anything i have been doing wrong.

Is there anyone that has seen this before?

Update: ANR keyDispatchingTimedOut

Kara
  • 6,115
  • 16
  • 50
  • 57
kincaid
  • 929
  • 1
  • 7
  • 18

1 Answers1

0

https://stackoverflow.com/a/5513623/413127 your getting an ANR the logs from Google Play aren't going to help you.

What do you do in the launcher activity of your app. Do you create a database / download some stuff from the internet?

It sounds like it doesn't crash on your local device because this has already been done and so your activity doesn't do whatever long winded code is running on your UI thread.

To attempt to recreate the problem, go into the menu on your emulator and uninstall your application manually (pressing clear data) would also work, alternatively you can use adb:

./adb uninstall com.your.package

Now install the APK that you submitted to the Google Play using ADB something like:

./adb install /folder/to/YourLiveApp.apk

open the app and 9 times out of 10 you should get your ANR error.

Community
  • 1
  • 1
Blundell
  • 75,855
  • 30
  • 208
  • 233
  • The launcher activity presents a alertdialog after checking if the GPS is active, and creates a database for storing information later. I will try to create a splash screen or something like that to avoid this happening. But i cannot re-create this in the simluator:( – kincaid Jun 21 '12 at 16:25
  • Hmm you'll want to create your DB on the main thread, but access it (read/write) on another thread. You will also want to get location updates in an ASyncTask or Thread. I've actually just written a tutorial showing a splashscreen with ASyncTask http://blog.blundell-apps.com/tut-splashscreen-with-progress-bar/ – Blundell Jun 21 '12 at 18:21