語言

Activity.CallingActivity 屬性

定義

回傳觸發該活動的活動名稱。

public virtual Android.Content.ComponentName? CallingActivity { [Android.Runtime.Register("getCallingActivity", "()Landroid/content/ComponentName;", "GetGetCallingActivityHandler")] get; }
[<get: Android.Runtime.Register("getCallingActivity", "()Landroid/content/ComponentName;", "GetGetCallingActivityHandler")>]
member this.CallingActivity : Android.Content.ComponentName

屬性值

該活動的 ComponentName 會收到你的回覆,若沒有則為 null。

屬性

備註

回傳觸發該活動的活動名稱。 這就是 setResult() 中資料會被傳送給誰。 你可以利用這些資訊來驗證收件人是否被允許接收資料。 注意:如果呼叫的活動沒有預期結果(也就是沒有使用包含請求碼的 startActivityForResult(Intent, int) 表單),那麼呼叫套件將是 null。

Android 參考資料。android.app.Activity.getCallingActivity

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

適用於