SystemOnBackInvokedCallbacks.FinishAndRemoveTaskCallback(Activity) 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.
Get a callback that finishes the associated Activity, removing its task from
Recents when the activity is the task root.
[Android.Runtime.Register("finishAndRemoveTaskCallback", "(Landroid/app/Activity;)Landroid/window/OnBackInvokedCallback;", "", ApiSince=36)]
public static Android.Window.IOnBackInvokedCallback FinishAndRemoveTaskCallback(Android.App.Activity activity);
[<Android.Runtime.Register("finishAndRemoveTaskCallback", "(Landroid/app/Activity;)Landroid/window/OnBackInvokedCallback;", "", ApiSince=36)>]
static member FinishAndRemoveTaskCallback : Android.App.Activity -> Android.Window.IOnBackInvokedCallback
Parameters
- activity
- Activity
The associated Activity
Returns
A callback that finishes the activity when back is invoked and removes its task from Recents only when the activity is the task root.
- Attributes
Remarks
Get a callback to triggers Activity#finishAndRemoveTask() on the associated Activity. If the activity is the root activity of its task, the entire task will be removed from the recents task. The activity will be finished in all cases. The system will play the corresponding transition animation.
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.