ReactiveFragmentActivity.OnPause() method¶
Defined in
Type: ReactiveFragmentActivity
Namespace: ReactiveUI.AndroidX
Assembly: ReactiveUI.AndroidX.dll
Applies to
net10.0-android36.0
protected override void OnPause()
Inherited documentation
These docs were inherited from Activity. The member doesn't override them on this type.
Summary: Called as part of the activity lifecycle when the user no longer actively interacts with the activity, but it is still visible on screen.
Remarks
Called as part of the activity lifecycle when the user no longer actively interacts with the
activity, but it is still visible on screen. The counterpart to #onResume.
When activity B is launched in front of activity A, this callback will
be invoked on A. B will not be created until A's #onPause returns,
so be sure to not do anything lengthy here.
This callback is mostly used for saving any persistent state the activity is editing, to present a "edit in place" model to the user and making sure nothing is lost if there are not enough resources to start the new activity without first killing this one. This is also a good place to stop things that consume a noticeable amount of CPU in order to make the switch to the next activity as fast as possible.
On platform versions prior to android.os.Build.VERSION_CODES#Q this is also a good
place to try to close exclusive-access devices or to release access to singleton resources.
Starting with android.os.Build.VERSION_CODES#Q there can be multiple resumed
activities in the system at the same time, so #onTopResumedActivityChanged(boolean)
should be used for that purpose instead.
If an activity is launched on top, after receiving this call you will usually receive a
following call to #onStop (after the next activity has been resumed and displayed
above). However in some cases there will be a direct call back to #onResume without
going through the stopped state. An activity can also rest in paused state in some cases when
in multi-window mode, still visible to user.
Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.
Java documentation for
android.app.Activity.onPause()
.
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.