Activity.OnStateNotSaved Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method was deprecated in API level 29.
[Android.Runtime.Register("onStateNotSaved", "()V", "GetOnStateNotSavedHandler", ApiSince=23)]
public virtual void OnStateNotSaved();
[<Android.Runtime.Register("onStateNotSaved", "()V", "GetOnStateNotSavedHandler", ApiSince=23)>]
abstract member OnStateNotSaved : unit -> unit
override this.OnStateNotSaved : unit -> unit
- Attributes
Remarks
This method was deprecated in API level 29. starting with Build.VERSION_CODES.P onSaveInstanceState is called after onStop(), so this hint isn't accurate anymore: you should consider your state not saved in between onStart and onStop callbacks inclusively.
Called when an onResume() is coming up, prior to other pre-resume callbacks such as onNewIntent(Intent) and onActivityResult(int, int, Intent). This is primarily intended to give the activity a hint that its state is no longer saved -- it will generally be called after onSaveInstanceState(Bundle) and prior to the activity being resumed/started again.
Android reference for android.app.Activity.onStateNotSaved.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.