Android.Content.Intent.MakeMainActivity Method
Create an intent to launch the main (root) activity of a task.

Syntax

[Android.Runtime.Register("makeMainActivity", "(Landroid/content/ComponentName;)Landroid/content/Intent;", "")]
public static Intent MakeMainActivity (ComponentName mainActivity)

See Also

Intent.SetComponent(ComponentName)

Parameters

mainActivity
The main activity component that this Intent will launch.

Returns

Documentation for this section has not yet been entered.

Remarks

Create an intent to launch the main (root) activity of a task. This is the Intent that is started when the application's is launched from Home. For anything else that wants to launch an application in the same way, it is important that they use an Intent structured the same way, and can use this function to ensure this is the case.

The returned Intent has the given Activity component as its explicit component, Intent.ActionMain as its action, and includes the category Intent.CategoryLauncher. This does not have Intent.FLAG_ACTIVITY_NEW_TASK set, though typically you will want to do that through Intent.AddFlags(ActivityFlags) on the returned Intent.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11