4 December 2011

How to solve problem with Activity did not call through to super.onPause() exception

Story:

So you implement your Activity class and you add onPause method and you fire your application and you suddenly see error like this:

12-04 20:34:33.042: E/AndroidRuntime(7684): android.app.SuperNotCalledException: Activity {org.ovh.pastor.secrectsoft/org.ovh.pastor. secrectsoft .Awesome} did not call through to super.onPause()

And you thinking  ? Eee...?

Solution:

Simply add super.onPause(); in first line of method onPause() and your app will be happy.

Example:

@Override
public void onPause(){
 super.onPause();
  //TODO awesome stuff like saving state and etc.
}

Source:
http://developer.android.com/reference/android/app/Activity.html#onPause()

No comments:

Post a Comment