Activity.StartActivityFromChild Method
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.
Overloads
| Name | Description |
|---|---|
| StartActivityFromChild(Activity, Intent, Int32) |
Same as calling |
| StartActivityFromChild(Activity, Intent, Int32, Bundle) |
This is called when a child activity of this one calls its
|
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
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 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
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.