次の方法で共有


AlwaysOnHotwordDetector.SetParameter(Int32, Int32) Method

Definition

Set a model specific ModelParams with the given value.

[Android.Runtime.Register("setParameter", "(II)I", "GetSetParameter_IIHandler", ApiSince=30)]
public virtual int SetParameter (int modelParam, int value);
[<Android.Runtime.Register("setParameter", "(II)I", "GetSetParameter_IIHandler", ApiSince=30)>]
abstract member SetParameter : int * int -> int
override this.SetParameter : int * int -> int

Parameters

modelParam
Int32

ModelParams

value
Int32

Value to set

Returns

  • SoundTrigger#STATUS_OK in case of success - SoundTrigger#STATUS_NO_INIT if the native service cannot be reached - SoundTrigger#STATUS_BAD_VALUE invalid input parameter - SoundTrigger#STATUS_INVALID_OPERATION if the call is out of sequence or if API is not supported by HAL
Attributes

Remarks

Set a model specific ModelParams with the given value. This parameter will keep its value for the duration the model is loaded regardless of starting and stopping recognition. Once the model is unloaded, the value will be lost. AlwaysOnHotwordDetector#queryParameter should be checked first before calling this method. Caller must be the active voice interaction service via Settings.Secure.VOICE_INTERACTION_SERVICE.

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