语言

Activity.Caller 属性

定义

返回启动此活动的应用的 ComponentCaller 实例。

public virtual Android.App.ComponentCaller? Caller { [Android.Runtime.Register("getCaller", "()Landroid/app/ComponentCaller;", "GetGetCallerHandler", ApiSince=35)] get; }
[<get: Android.Runtime.Register("getCaller", "()Landroid/app/ComponentCaller;", "GetGetCallerHandler", ApiSince=35)>]
member this.Caller : Android.App.ComponentCaller

属性值

ComponentCaller 与意向 #getIntent()对应的实例,或者 null 未使用该意向启动活动

特性

注解

返回启动此活动的应用的 ComponentCaller 实例。 若要保留 ComponentCaller 实例以供将来使用,请调用 setIntent(Intent,ComponentCaller),并使用此方法检索它。 请注意,在 onNewIntent(Intent)中,此方法将返回原始 ComponentCaller。 可以使用 setIntent(Intent,ComponentCaller)将其更新为新的 ComponentCaller。

Android 参考。android.app.Activity.getCaller

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

适用于