Activity.StartActivityFromChild Method

Definition

Overloads

Name Description
StartActivityFromChild(Activity, Intent, Int32)

This method was deprecated in API level 30.

StartActivityFromChild(Activity, Intent, Int32, Bundle)

This method was deprecated in API level 30.

StartActivityFromChild(Activity, Intent, Int32)

This method was deprecated in API level 30.

[Android.Runtime.Register("startActivityFromChild", "(Landroid/app/Activity;Landroid/content/Intent;I)V", "GetStartActivityFromChild_Landroid_app_Activity_Landroid_content_Intent_IHandler")]
public virtual void StartActivityFromChild(Android.App.Activity child, Android.Content.Intent? intent, int requestCode);
[<Android.Runtime.Register("startActivityFromChild", "(Landroid/app/Activity;Landroid/content/Intent;I)V", "GetStartActivityFromChild_Landroid_app_Activity_Landroid_content_Intent_IHandler")>]
abstract member StartActivityFromChild : Android.App.Activity * Android.Content.Intent * int -> unit
override this.StartActivityFromChild : Android.App.Activity * Android.Content.Intent * int -> unit

Parameters

child
Activity

Activity: The activity making the call. This value cannot be null.

intent
Intent

Intent: The intent to start.

requestCode
Int32

int: Reply request code. < 0 if reply is not requested.

Attributes

Remarks

This method was deprecated in API level 30. Use androidx.fragment.app.FragmentActivity.startActivityFromFragment( androidx.fragment.app.Fragment,Intent,int)

Same as calling startActivityFromChild(Activity,Intent,int,Bundle) with no options.

See also:

Throws: android.content.ActivityNotFoundException

Android reference for android.app.Activity.startActivityFromChild.

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

StartActivityFromChild(Activity, Intent, Int32, Bundle)

This method was deprecated in API level 30.

[Android.Runtime.Register("startActivityFromChild", "(Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;)V", "GetStartActivityFromChild_Landroid_app_Activity_Landroid_content_Intent_ILandroid_os_Bundle_Handler")]
public virtual void StartActivityFromChild(Android.App.Activity child, Android.Content.Intent? intent, int requestCode, Android.OS.Bundle? options);
[<Android.Runtime.Register("startActivityFromChild", "(Landroid/app/Activity;Landroid/content/Intent;ILandroid/os/Bundle;)V", "GetStartActivityFromChild_Landroid_app_Activity_Landroid_content_Intent_ILandroid_os_Bundle_Handler")>]
abstract member StartActivityFromChild : Android.App.Activity * Android.Content.Intent * int * Android.OS.Bundle -> unit
override this.StartActivityFromChild : Android.App.Activity * Android.Content.Intent * int * Android.OS.Bundle -> unit

Parameters

child
Activity

Activity: The activity making the call. This value cannot be null.

intent
Intent

Intent: The intent to start.

requestCode
Int32

int: Reply request code. < 0 if reply is not requested.

options
Bundle

Bundle: Additional options for how the Activity should be started. See android.content.Context.startActivity(Intent,Bundle) Context.startActivity(Intent, Bundle)} for more details. This value may be null.

Attributes

Remarks

This method was deprecated in API level 30. Use androidx.fragment.app.FragmentActivity.startActivityFromFragment( androidx.fragment.app.Fragment,Intent,int,Bundle)

This is called when a child activity of this one calls its startActivity(Intent) or startActivityForResult(Intent, int) method. This method throws ActivityNotFoundException if there was no Activity found to run the given Intent.

See also:

Throws: android.content.ActivityNotFoundException

Android reference for android.app.Activity.startActivityFromChild.

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