Android.App.Instrumentation.StartActivitySync Method
Start a new activity and wait for it to begin running before returning.

Syntax

[Android.Runtime.Register("startActivitySync", "(Landroid/content/Intent;)Landroid/app/Activity;", "GetStartActivitySync_Landroid_content_Intent_Handler")]
public virtual Activity StartActivitySync (Android.Content.Intent intent)

See Also

Android.Content.Context.StartActivity(Android.Content.Intent)

Parameters

intent
Description of the activity to start.

Returns

Documentation for this section has not yet been entered.

Remarks

Start a new activity and wait for it to begin running before returning. In addition to being synchronous, this method as some semantic differences from the standard Android.Content.Context.StartActivity(Android.Content.Intent) call: the activity component is resolved before talking with the activity manager (its class name is specified in the Intent that this method ultimately starts), and it does not allow you to start activities that run in a different process. In addition, if the given Intent resolves to multiple activities, instead of displaying a dialog for the user to select an activity, an exception will be thrown.

The function returns as soon as the activity goes idle following the call to its Activity.OnCreate(Android.OS.Bundle). Generally this means it has gone through the full initialization including Activity.OnResume and drawn and displayed its initial window.

[Android Documentation]

Requirements

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