Skip to content Skip to sidebar Skip to footer

Android Onresume Not Called

I'm developing an app for Android, and I want it to pause the music when you press the home button (onPause). That works fine, but then when I try to start up the game again, onRes

Solution 1:

When you get an "application not responding" error, that means that your activity has taken too long on the main application thread. Identify all the work that you are doing on the main application thread and migrate the slow stuff to a background thread or AsyncTask.

Solution 2:

I think I may know what my error is: It is running some unneeded code when onSizeChanged is called on the SurfaceView (which i guess might happen when you pause the Activity and something else comes in to view)... I'll check it out. Thanks everyone!

Post a Comment for "Android Onresume Not Called"