Activity.CurrentCaller 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回通过或通过#onNewIntent新意向#onActivityResult重新启动此活动的应用的 ComponentCaller 实例。
public virtual Android.App.ComponentCaller CurrentCaller { [Android.Runtime.Register("getCurrentCaller", "()Landroid/app/ComponentCaller;", "GetGetCurrentCallerHandler", ApiSince=35)] get; }
[<get: Android.Runtime.Register("getCurrentCaller", "()Landroid/app/ComponentCaller;", "GetGetCurrentCallerHandler", ApiSince=35)>]
member this.CurrentCaller : Android.App.ComponentCaller
属性值
ComponentCaller 实例
- 属性
注解
返回通过 onNewIntent(Intent) 或 onActivityResult(int、int、Intent、Intent)重新启动此活动的应用的 ComponentCaller 实例。 请注意,此方法仅适用于 onNewIntent(Intent)和 onActivityResult(int、int、Intent)方法。 如果在 onNewIntent(Intent) 和 onActivityResult(int、int、Intent)外部调用此方法,则会引发 IllegalStateException。 如果重写 onNewIntent(Intent,ComponentCaller)或 onActivityResult(int,int,Intent,ComponentCaller),还可以检索调用方。 若要保留 ComponentCaller 实例以供将来使用,请调用 setIntent(Intent,ComponentCaller),并使用 getCaller()来检索它。
另请参阅:
引发:如果调用方为 null,则为 IllegalStateException,指示方法是在 OnNewIntent(Intent) 外部调用的
Android 参考。android.app.Activity.getCurrentCaller
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。