Share via


Instrumentation.OnStart Method

Definition

Method where the instrumentation thread enters execution.

[Android.Runtime.Register("onStart", "()V", "GetOnStartHandler")]
public virtual void OnStart ();
[<Android.Runtime.Register("onStart", "()V", "GetOnStartHandler")>]
abstract member OnStart : unit -> unit
override this.OnStart : unit -> unit
Attributes

Remarks

Method where the instrumentation thread enters execution. This allows you to run your instrumentation code in a separate thread than the application, so that it can perform blocking operation such as #sendKeySync or #startActivitySync.

You will typically want to call finish() when this function is done, to end your instrumentation.

Java documentation for android.app.Instrumentation.onStart().

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