VoiceInteractionService.CreateAlwaysOnHotwordDetector 方法

定义

为给定的密钥短语和区域设置创建一个 AlwaysOnHotwordDetector

[Android.Runtime.Register("createAlwaysOnHotwordDetector", "(Ljava/lang/String;Ljava/util/Locale;Landroid/service/voice/AlwaysOnHotwordDetector$Callback;)Landroid/service/voice/AlwaysOnHotwordDetector;", "")]
public Android.Service.Voice.AlwaysOnHotwordDetector? CreateAlwaysOnHotwordDetector (string? keyphrase, Java.Util.Locale? locale, Android.Service.Voice.AlwaysOnHotwordDetector.Callback? callback);
[<Android.Runtime.Register("createAlwaysOnHotwordDetector", "(Ljava/lang/String;Ljava/util/Locale;Landroid/service/voice/AlwaysOnHotwordDetector$Callback;)Landroid/service/voice/AlwaysOnHotwordDetector;", "")>]
member this.CreateAlwaysOnHotwordDetector : string * Java.Util.Locale * Android.Service.Voice.AlwaysOnHotwordDetector.Callback -> Android.Service.Voice.AlwaysOnHotwordDetector

参数

keyphrase
String

正在使用的密钥短语,例如“Hello Android”。

locale
Locale

需要为其执行注册的区域设置。

callback
AlwaysOnHotwordDetector.Callback

用于通知检测事件的回调。

返回

属性

注解

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于