Question

When I extend MapActivity instead of Activity, I can not use onPause(), onResume(), onRestart() functions. When I create protected void onPause(), there is an error for force close when I click home button. I tried ActivityGroup and it doesn't work too. What should I do?

Was it helpful?

Solution

Did you forget to call super.onPause(), super.onResume(), etc.?

Quote from the documentation:

Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top