How to save and recreate android activities
<p>I'm trying to teach myself some android programming and I'm unable to get my app to save and load a users progress. </p>

<p>Currently I initialise my variables level and score in my activity. Then call this from my onCreate method: </p>

<pre><code>    if (savedInstanceState != null) {
        // Restore value of members from saved state
        playersScore = savedInstanceState.getInt(STATE_SCORE);
        level = savedInstanceState.getInt(STATE_LEVEL);
    } else {
        playersScore = 0;
        level = 0;
    }
</code></pre>

<p>and finally I have a method for saving a bundle:</p>

<pre><code>@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
    savedInstanceState.putInt(STATE_SCORE, playersScore);
    savedInstanceState.putInt(STATE_LEVEL, level);

    super.onSaveInstanceState(savedInstanceState);
}
</code></pre>

<p>For some reason my bundle wont save, any ideas on what I'm missing?</p>
