语言

Instrumentation.TargetContext 属性

定义

返回要检测的目标应用程序的上下文。

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

属性值

目标应用程序中的上下文。

特性

注解

返回要检测的目标应用程序的上下文。 请注意,这通常不同于检测代码的上下文,因为检测代码通常与它运行的应用程序包不同。 请参阅 getContext(),检索检测代码的上下文。

Android 参考。android.app.Instrumentation.getTargetContext

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

另请参阅