Compartilhar via


Intent.MakeRestartActivityTask(ComponentName) Method

Definition

Make an Intent that can be used to re-launch an application's task in its base state.

[Android.Runtime.Register("makeRestartActivityTask", "(Landroid/content/ComponentName;)Landroid/content/Intent;", "")]
public static Android.Content.Intent? MakeRestartActivityTask (Android.Content.ComponentName? mainActivity);
[<Android.Runtime.Register("makeRestartActivityTask", "(Landroid/content/ComponentName;)Landroid/content/Intent;", "")>]
static member MakeRestartActivityTask : Android.Content.ComponentName -> Android.Content.Intent

Parameters

mainActivity
ComponentName

The activity component that is the root of the task; this is the activity that has been published in the application's manifest as the main launcher icon.

Returns

Returns a newly created Intent that can be used to relaunch the activity's task in its root state.

Attributes

Remarks

Make an Intent that can be used to re-launch an application's task in its base state. This is like #makeMainActivity(ComponentName), but also sets the flags #FLAG_ACTIVITY_NEW_TASK and #FLAG_ACTIVITY_CLEAR_TASK.

Java documentation for android.content.Intent.makeRestartActivityTask(android.content.ComponentName).

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