java.lang.Object | ||
↳ | android.app.VoiceInteractor.Request | |
↳ | android.app.VoiceInteractor.PickOptionRequest |
Select a single option from multiple potential options with the user via the trusted system
VoiceInteractionService. Typically, the application would present this visually as
a list view to allow selecting the option by touch.
The result of the confirmation will be returned through an asynchronous call to
either onPickOptionResult(boolean, VoiceInteractor.PickOptionRequest.Option[], Bundle)
or onCancel()
- these methods should
be overridden to define the application specific behavior.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
VoiceInteractor.PickOptionRequest.Option | Represents a single option that the user may select using their voice. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new pick option request.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when a single option is confirmed or narrowed to one of several options.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.app.VoiceInteractor.Request
| |||||||||||
From class
java.lang.Object
|
Create a new pick option request.
prompt | Optional question to be asked of the user when the options are presented or null if nothing should be asked. |
---|---|
options | The set of VoiceInteractor.PickOptionRequest.Option s the user is selecting from. |
extras | Additional optional information or null. |
Called when a single option is confirmed or narrowed to one of several options. Override this method to define the behavior when the user selects an option or narrows down the set of options.
finished | True if the voice interaction has finished making a selection, in
which case selections contains the final result. If false, this request is
still active and you will continue to get calls on it. |
---|---|
selections | Either a single VoiceInteractor.PickOptionRequest.Option or one of several VoiceInteractor.PickOptionRequest.Option s the
user has narrowed the choices down to. |
result | Additional optional information. |