Share via


VoiceInteractionSession.OnShow(Bundle, ShowFlags) Method

Definition

Called when the session UI is going to be shown.

[Android.Runtime.Register("onShow", "(Landroid/os/Bundle;I)V", "GetOnShow_Landroid_os_Bundle_IHandler", ApiSince=23)]
public virtual void OnShow (Android.OS.Bundle? args, Android.Service.Voice.ShowFlags showFlags);
[<Android.Runtime.Register("onShow", "(Landroid/os/Bundle;I)V", "GetOnShow_Landroid_os_Bundle_IHandler", ApiSince=23)>]
abstract member OnShow : Android.OS.Bundle * Android.Service.Voice.ShowFlags -> unit
override this.OnShow : Android.OS.Bundle * Android.Service.Voice.ShowFlags -> unit

Parameters

args
Bundle

The arguments that were supplied to VoiceInteractionService#showSession VoiceInteractionService.showSession. Some example keys include : "invocation_type", "invocation_phone_state", #KEY_SHOW_SESSION_ID, "invocation_time_ms", Intent.EXTRA_TIME ("android.intent.extra.TIME") indicating timing in milliseconds of the KeyEvent that triggered Assistant and Intent.EXTRA_ASSIST_INPUT_DEVICE_ID (android.intent.extra.ASSIST_INPUT_DEVICE_ID) referring to the device that sent the request. Starting from Android 14, the system will add VoiceInteractionService#KEY_SHOW_SESSION_ID, the Bundle is not null. But the application should handle null case before Android 14.

showFlags
ShowFlags

The show flags originally provided to VoiceInteractionService#showSession VoiceInteractionService.showSession.

Attributes

Remarks

Called when the session UI is going to be shown. This is called after #onCreateContentView (if the session's content UI needed to be created) and immediately prior to the window being shown. This may be called while the window is already shown, if a show request has come in while it is shown, to allow you to update the UI to match the new show arguments.

Java documentation for android.service.voice.VoiceInteractionSession.onShow(android.os.Bundle, 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.

Applies to