語言

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

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於