Consider the following method:

```
@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putSerializable("repertoire",rep);
}

```

I'm using the menu `NavigationDrawer` geneated by Android Studio. When I go back to main activity, `savedInstanceState` is always `null` in my class:

public class MainActivity extends ActionBarActivity implements NavigationDrawerFragment.NavigationDrawerCallbacks : 

```
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if( savedInstanceState != null ) {
        rep = (repertoire) savedInstanceState.getSerializable("repertoire");
            }
        setContentView(R.layout.activity_main);

        mNavigationDrawerFragment = (NavigationDrawerFragment)                      getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
        mTitle = getTitle();
        ListView vue = (ListView) findViewById(R.id.listView);
        if(rep==null){
            rep = new repertoire();
        }

        // Set up the drawer.
        mNavigationDrawerFragment.setUp(
                R.id.navigation_drawer,
                (DrawerLayout) findViewById(R.id.drawer_layout));
}

```