Share via


SystemOnBackInvokedCallbacks.FinishAndRemoveTaskCallback(Activity) Method

Definition

Get a callback to triggers Activity#finishAndRemoveTask() on the associated Activity.

[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

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.

Java documentation for android.window.SystemOnBackInvokedCallbacks.finishAndRemoveTaskCallback(android.app.Activity).

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.

Applies to