Udostępnij za pośrednictwem


AlwaysOnHotwordDetector.StartRecognition(RecognitionFlag) Method

Definition

Starts recognition for the associated keyphrase.

[Android.Runtime.Register("startRecognition", "(I)Z", "GetStartRecognition_IHandler")]
public virtual bool StartRecognition (Android.Service.Voice.RecognitionFlag recognitionFlags);
[<Android.Runtime.Register("startRecognition", "(I)Z", "GetStartRecognition_IHandler")>]
abstract member StartRecognition : Android.Service.Voice.RecognitionFlag -> bool
override this.StartRecognition : Android.Service.Voice.RecognitionFlag -> bool

Parameters

recognitionFlags
RecognitionFlag

The flags to control the recognition properties.

Returns

Indicates whether the call succeeded or not.

Attributes

Exceptions

if the recognition isn't supported. Callers should only call this method after a supported state callback on AlwaysOnHotwordDetector Callback onAvailabilityChanged(int) to avoid this exception.

if the detector is in an invalid state. This may happen if another detector has been instantiated or the VoiceInteractionService hosting this detector has been shut down.

Remarks

Starts recognition for the associated keyphrase. Caller must be the active voice interaction service via Settings.Secure.VOICE_INTERACTION_SERVICE.

Java documentation for android.service.voice.AlwaysOnHotwordDetector.startRecognition(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