Activity.CurrentCaller Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the ComponentCaller instance of the app that re-launched this activity with a new
intent via #onNewIntent or #onActivityResult.
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
Property Value
ComponentCaller instance
- Attributes
Remarks
Returns the ComponentCaller instance of the app that re-launched this activity with a new intent via #onNewIntent or #onActivityResult.
Note that this method only works within the #onNewIntent and #onActivityResult methods. If you call this method outside #onNewIntent and #onActivityResult, it will throw an IllegalStateException.
You can also retrieve the caller if you override #onNewIntent(Intent, ComponentCaller) or #onActivityResult(int, int, Intent, ComponentCaller).
To keep the ComponentCaller instance for future use, call #setIntent(Intent, ComponentCaller), and use #getCaller to retrieve it.
Java documentation for android.app.Activity.getCurrentCaller().
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.