public static class VoiceInteractor.PickOptionRequest extends VoiceInteractor.Request
onPickOptionResult(boolean, android.app.VoiceInteractor.PickOptionRequest.Option[], android.os.Bundle)
or VoiceInteractor.Request.onCancel()
- these methods should
be overridden to define the application specific behavior.Modifier and Type | Class and Description |
---|---|
static class |
VoiceInteractor.PickOptionRequest.Option
Represents a single option that the user may select using their voice.
|
Constructor and Description |
---|
PickOptionRequest(CharSequence prompt,
VoiceInteractor.PickOptionRequest.Option[] options,
Bundle extras)
Create a new pick option request.
|
PickOptionRequest(VoiceInteractor.Prompt prompt,
VoiceInteractor.PickOptionRequest.Option[] options,
Bundle extras)
Create a new pick option request.
|
Modifier and Type | Method and Description |
---|---|
void |
onPickOptionResult(boolean finished,
VoiceInteractor.PickOptionRequest.Option[] selections,
Bundle result)
Called when a single option is confirmed or narrowed to one of several options.
|
cancel, getActivity, getContext, getName, onAttached, onCancel, onDetached, toString
public PickOptionRequest(VoiceInteractor.Prompt prompt, VoiceInteractor.PickOptionRequest.Option[] options, Bundle extras)
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.public PickOptionRequest(CharSequence prompt, VoiceInteractor.PickOptionRequest.Option[] options, Bundle extras)
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.public void onPickOptionResult(boolean finished, VoiceInteractor.PickOptionRequest.Option[] selections, Bundle result)
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.