onSaveInstanceState doesn't work
I think you've fallen into a really common trap many devs have since the Android OS team overloaded the onSaveInstanceState()
method.
You are overriding the wrong method. The one you want is:
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
String a = "WTF";
outState.putString("hello",a);
}
Personally, I think Craig Mautner should be forced to donate money every time an Android developer makes this mistake - source