Deprecated Configuration Change Methods

A couple of methods on Activity have been deprecated, so you should no longer use them:

  • getLastNonConfigurationInstance()
  • onRetainNonConfigurationInstance()

These methods previously allowed you to save an arbitrary object from an activity that was being destroyed, to be passed to the next instance of the activity that was being created. Although they were useful, you should now use the methods described earlier instead to manage data between instances of activities in the destroy/create cycle.

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.