onRestoreInstanceState not being called
<p>Follow on from a previous question</p>

<p>One first screen activity I am clicking a button and doing this </p>

<pre><code>Intent intent = new Intent(MainMenu.this, NewClass.class);
intent.putExtra("value1", value1);  
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
</code></pre>

<p>Value is passed to new activity and is used in the <code>onCreate()</code>-method</p>

<p>On new Activity I am saving the state when I click back button</p>

<pre><code>@Override
protected void onSaveInstanceState(Bundle outState) {
    // the UI component values are saved here.
    super.onSaveInstanceState(outState);
    Toast.makeText(this, "Activity state saved", Toast.LENGTH_LONG).show();
}

@Override
public void onBackPressed() {
    //super.onBackPressed();
    Intent intent = new Intent(RoundScoring.this, MainMenu.class);
    intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
    startActivity(intent);
    Toast.makeText(this, "Back Button Pressed", Toast.LENGTH_LONG).show();
}
</code></pre>

<p>On the first screen again I am clicking a different button with the following :</p>

<pre><code>Intent intentContiune = new Intent(MainMenu.this, NewClass.class);
intentContiune.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intentContiune);
</code></pre>

<p>The Activty is loaded but always fails as the value has not been set. I wrote a <code>onRestorInstanceState</code> to re-populate the value from the bundle but it is never fired. Can someone say what I am doing wrong</p>

<p>Thanks for your time</p>

<p>UPDATE</p>

<pre><code>@Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        Log.d(DEBUG_TAG, "returnstate called");
        super.onRestoreInstanceState(savedInstanceState);
        value = savedInstanceState.getString("value");


    }
</code></pre>
