public final class SoundTriggerManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SoundTriggerManager.Model
Class captures the data and fields that represent a non-keyphrase sound model.
|
Constructor and Description |
---|
SoundTriggerManager(Context context,
ISoundTriggerService soundTriggerService) |
Modifier and Type | Method and Description |
---|---|
SoundTriggerDetector |
createSoundTriggerDetector(UUID soundModelId,
SoundTriggerDetector.Callback callback,
Handler handler)
Creates an instance of
SoundTriggerDetector which can be used to start/stop
recognition on the model and register for triggers from the model. |
void |
deleteModel(UUID soundModelId)
Deletes the sound model represented by the provided UUID.
|
SoundTriggerManager.Model |
getModel(UUID soundModelId)
Returns the sound trigger model represented by the given UUID.
|
void |
updateModel(SoundTriggerManager.Model model)
Updates the given sound trigger model.
|
public SoundTriggerManager(Context context, ISoundTriggerService soundTriggerService)
public void updateModel(SoundTriggerManager.Model model)
public SoundTriggerManager.Model getModel(UUID soundModelId)
SoundTriggerManager.Model
is returned.public void deleteModel(UUID soundModelId)
public SoundTriggerDetector createSoundTriggerDetector(UUID soundModelId, SoundTriggerDetector.Callback callback, Handler handler)
SoundTriggerDetector
which can be used to start/stop
recognition on the model and register for triggers from the model. Note that this call
invalidates any previously returned instances for the same sound model Uuid.soundModelId
- UUID of the sound model to create the receiver object for.callback
- Instance of the SoundTriggerDetector#Callback
object for the
callbacks for the given sound model.handler
- The Handler to use for the callback operations. A null value will use the
current thread's Looper.SoundTriggerDetector
or null on error.