다음을 통해 공유


Instrumentation.Context Property

Definition

Return the Context of this instrumentation's package.

public virtual Android.Content.Context? Context { [Android.Runtime.Register("getContext", "()Landroid/content/Context;", "GetGetContextHandler")] get; }
[<get: Android.Runtime.Register("getContext", "()Landroid/content/Context;", "GetGetContextHandler")>]
member this.Context : Android.Content.Context

Property Value

The instrumentation's package context.

Attributes

Remarks

Return the Context of this instrumentation's package. Note that this is often different than the Context of the application being instrumentated, since the instrumentation code often lives is a different package than that of the application it is running against. See #getTargetContext to retrieve a Context for the target application.

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

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

See also