Share via


Activity.StartActivityFromChild Method

Definition

Overloads

StartActivityFromChild(Activity, Intent, Int32, Bundle)

This is called when a child activity of this one calls its #startActivity or #startActivityForResult method.

StartActivityFromChild(Activity, Intent, Int32)

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

StartActivityFromChild(Activity, Intent, Int32, Bundle)

This is called when a child activity of this one calls its #startActivity or #startActivityForResult method.

[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

The activity making the call.

intent
Intent

The intent to start.

requestCode
Int32

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

options
Bundle

Additional options for how the Activity should be started. See android.content.Context#startActivity(Intent, Bundle) Context.startActivity(Intent, Bundle)} for more details.

Attributes

Exceptions

Remarks

This is called when a child activity of this one calls its #startActivity or #startActivityForResult method.

This method throws android.content.ActivityNotFoundException if there was no Activity found to run the given Intent.

This member is deprecated. Use androidx.fragment.app.FragmentActivity#startActivityFromFragment( androidx.fragment.app.Fragment,Intent,int,Bundle)

Java documentation for android.app.Activity.startActivityFromChild(android.app.Activity, android.content.Intent, int, android.os.Bundle).

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.

See also

  • <xref:Android.App.Activity.StartActivityForResult(Android.Content.Intent%2c+System.Int32)>

Applies to

StartActivityFromChild(Activity, Intent, Int32)

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

[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

The activity making the call.

intent
Intent

The intent to start.

requestCode
Int32

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

Attributes

Exceptions

Remarks

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

This member is deprecated. Use androidx.fragment.app.FragmentActivity#startActivityFromFragment( androidx.fragment.app.Fragment,Intent,int)

Java documentation for android.app.Activity.startActivityFromChild(android.app.Activity, android.content.Intent, int).

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.

See also

  • <xref:Android.App.Activity.StartActivityForResult(Android.Content.Intent%2c+System.Int32)>

Applies to