VoiceInteractionSession.StartAssistantActivity Method

Definition

Overloads

StartAssistantActivity(Intent)

Ask that a new assistant activity be started.

StartAssistantActivity(Intent, Bundle)

Ask that a new assistant activity be started.

StartAssistantActivity(Intent)

Ask that a new assistant activity be started.

[Android.Runtime.Register("startAssistantActivity", "(Landroid/content/Intent;)V", "GetStartAssistantActivity_Landroid_content_Intent_Handler", ApiSince=26)]
public virtual void StartAssistantActivity (Android.Content.Intent? intent);
[<Android.Runtime.Register("startAssistantActivity", "(Landroid/content/Intent;)V", "GetStartAssistantActivity_Landroid_content_Intent_Handler", ApiSince=26)>]
abstract member StartAssistantActivity : Android.Content.Intent -> unit
override this.StartAssistantActivity : Android.Content.Intent -> unit

Parameters

intent
Intent
Attributes

Remarks

Ask that a new assistant activity be started. This will create a new task in the in activity manager: this means that Intent#FLAG_ACTIVITY_NEW_TASK Intent.FLAG_ACTIVITY_NEW_TASK will be set for you to make it a new task.

The newly started activity will be displayed on top of other activities in the system in a new layer that is not affected by multi-window mode. Tasks started from this activity will go into the normal activity layer and not this new layer.

By default, the system will create a window for the UI for this session. If you are using an assistant activity instead, then you can disable the window creation by calling #setUiEnabled in #onPrepareShow(Bundle, int).

NOTE: if the app would like to override some options to start the Activity, use #startAssistantActivity(Intent, Bundle) instead.

Java documentation for android.service.voice.VoiceInteractionSession.startAssistantActivity(android.content.Intent).

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

StartAssistantActivity(Intent, Bundle)

Ask that a new assistant activity be started.

[Android.Runtime.Register("startAssistantActivity", "(Landroid/content/Intent;Landroid/os/Bundle;)V", "GetStartAssistantActivity_Landroid_content_Intent_Landroid_os_Bundle_Handler", ApiSince=34)]
public virtual void StartAssistantActivity (Android.Content.Intent intent, Android.OS.Bundle bundle);
[<Android.Runtime.Register("startAssistantActivity", "(Landroid/content/Intent;Landroid/os/Bundle;)V", "GetStartAssistantActivity_Landroid_content_Intent_Landroid_os_Bundle_Handler", ApiSince=34)>]
abstract member StartAssistantActivity : Android.Content.Intent * Android.OS.Bundle -> unit
override this.StartAssistantActivity : Android.Content.Intent * Android.OS.Bundle -> unit

Parameters

intent
Intent

the intent used to start an assistant activity

bundle
Bundle

Additional options for how the Activity should be started. See ActivityOptions for how to build the Bundle supplied here.

Attributes

Remarks

Ask that a new assistant activity be started. This will create a new task in the in activity manager: this means that Intent#FLAG_ACTIVITY_NEW_TASK Intent.FLAG_ACTIVITY_NEW_TASK will be set for you to make it a new task.

The newly started activity will be displayed on top of other activities in the system in a new layer that is not affected by multi-window mode. Tasks started from this activity will go into the normal activity layer and not this new layer.

By default, the system will create a window for the UI for this session. If you are using an assistant activity instead, then you can disable the window creation by calling #setUiEnabled in #onPrepareShow(Bundle, int).

Java documentation for android.service.voice.VoiceInteractionSession.startAssistantActivity(android.content.Intent, 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.

Applies to