共用方式為


VoiceInteractionSession.OnShow(Bundle, ShowFlags) 方法

定義

工作階段 UI 即將顯示時呼叫。

[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

參數

args
Bundle

提供給 VoiceInteractionService#showSession VoiceInteractionService.showSession的自變數。 一些範例索引鍵包括:「invocation_type」、「invocation_phone_state」、“ #KEY_SHOW_SESSION_IDinvocation_time_ms”、Intent.EXTRA_TIME(“android.intent.extra.TIME”),指出觸髮 Assistant 和 Intent.EXTRA_ASSIST_INPUT_DEVICE_ID (android.intent.extra.ASSIST_INPUT_DEVICE_ID) 的 KeyEvent 以毫秒為單位來指出傳送要求之裝置的時間。 從 Android 14 開始,系統會新增 VoiceInteractionService#KEY_SHOW_SESSION_ID,套件組合不是 Null。 但是應用程式應該在Android 14之前處理 Null 大小寫。

showFlags
ShowFlags

最初提供給 VoiceInteractionService#showSession VoiceInteractionService.showSession的顯示旗標。

屬性

備註

工作階段 UI 即將顯示時呼叫。 這會在之後呼叫 #onCreateContentView (如果需要建立會話的內容 UI),並在顯示視窗之前立即呼叫。 如果顯示顯示視窗時已出現顯示要求,您可以更新UI以符合新的 show 自變數,則可能會呼叫此專案。

android.service.voice.VoiceInteractionSession.onShow(android.os.Bundle, int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於