LocalActivityManager.GetActivity(String) Method

Definition

Caution

deprecated

Return the Activity object associated with a string ID.

[Android.Runtime.Register("getActivity", "(Ljava/lang/String;)Landroid/app/Activity;", "GetGetActivity_Ljava_lang_String_Handler")]
[System.Obsolete("deprecated")]
public virtual Android.App.Activity? GetActivity (string? id);
[<Android.Runtime.Register("getActivity", "(Ljava/lang/String;)Landroid/app/Activity;", "GetGetActivity_Ljava_lang_String_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member GetActivity : string -> Android.App.Activity
override this.GetActivity : string -> Android.App.Activity

Parameters

id
String

Returns

the associated Activity object, or null if the id is unknown or its activity is not currently instantiated

Attributes

Remarks

Return the Activity object associated with a string ID.

Java documentation for android.app.LocalActivityManager.getActivity(java.lang.String).

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

See also

  • <xref:Android.App.LocalActivityManager.StartActivity(System.String%2c+Android.Content.Intent)>