Share via


AlwaysOnHotwordDetector.CreateReEnrollIntent Method

Definition

Creates an intent to start the re-enrollment for the associated keyphrase.

[Android.Runtime.Register("createReEnrollIntent", "()Landroid/content/Intent;", "GetCreateReEnrollIntentHandler")]
public virtual Android.Content.Intent? CreateReEnrollIntent ();
[<Android.Runtime.Register("createReEnrollIntent", "()Landroid/content/Intent;", "GetCreateReEnrollIntentHandler")>]
abstract member CreateReEnrollIntent : unit -> Android.Content.Intent
override this.CreateReEnrollIntent : unit -> Android.Content.Intent

Returns

An Intent to start re-enrollment for the given keyphrase.

Attributes

Exceptions

if managing they keyphrase 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

Creates an intent to start the re-enrollment for the associated keyphrase. This intent must be invoked using Context#startForegroundService(Intent). Starting re-enrollment is only valid if the keyphrase is already enrolled, i.e. #STATE_KEYPHRASE_ENROLLED, otherwise invoking this may result in an error.

Java documentation for android.service.voice.AlwaysOnHotwordDetector.createReEnrollIntent().

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