savedInstanceState always null
<p>so i have this code in my OnsavedInstanceState</p>

<pre><code>@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
    super.onSaveInstanceState(savedInstanceState);
    String [] a={"haha"};
    savedInstanceState.putStringArray("MyStringarray", a);
    Toast.makeText(context, "Saved array", Toast.LENGTH_SHORT).show();
}
</code></pre>

<p>and i have this code in my onCreate</p>

<pre><code>@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    if(savedInstanceState==null){
        Toast.makeText(this, "not there", Toast.LENGTH_SHORT).show();
    }else{
        Toast.makeText(this, "is there", Toast.LENGTH_SHORT).show();
    }
}
</code></pre>

<p>how come the toast always says not there? i opened the app then switched to another app and it showed the toast saved array but when i reopen the app it says not there even though the bundle should have the string array containing "haha".</p>

<p>Many thanks!</p>
