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?
Asked
Active
Viewed 171 times
0
-
What is the error you get on force close? – sanna Jul 09 '12 at 12:52
-
"the application *** (process com.esetron.client) has stoped unexpectedly. Please try again later". If I don't use onResume, onPause functions, I don't get such an error – irukeru Jul 09 '12 at 13:08
1 Answers
1
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.

David Wasser
- 93,459
- 16
- 209
- 274
-
No, I didn't forget super.onPause(). Since I extend MapActivity, compiler gives error on super.onPause() line. – irukeru Jul 09 '12 at 13:12
-
That makes no sense. Of course you can override MapActiviy.onPause(). What error is the compiler giving you? – David Wasser Jul 09 '12 at 13:19
-
I don't know why but I made it work. I did project-> clean on eclipse and it worked :S – irukeru Jul 09 '12 at 13:21
-