Activity.CallingActivity Property

Definition

Return the name of the activity that invoked this activity.

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

Property Value

The ComponentName of the activity that will receive your reply, or null if none.

Attributes

Remarks

Return the name of the activity that invoked this activity. This is who the data in #setResult setResult() will be sent to. You can use this information to validate that the recipient is allowed to receive the data.

<p class="note">Note: if the calling activity is not expecting a result (that is it did not use the #startActivityForResult form that includes a request code), then the calling package will be null.

Java documentation for android.app.Activity.getCallingActivity().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to