public static class VoiceInteractor.ConfirmationRequest extends VoiceInteractor.Request
onConfirmationResult(boolean, android.os.Bundle)
or
VoiceInteractor.Request.onCancel()
- these methods should be overridden to define the application specific
behavior.
In some cases this may be a simple yes / no confirmation or the confirmation could include context information about how the action will be completed (e.g. booking a cab might include details about how long until the cab arrives) so the user can give a confirmation.
Constructor and Description |
---|
ConfirmationRequest(CharSequence prompt,
Bundle extras)
Create a new confirmation request.
|
ConfirmationRequest(VoiceInteractor.Prompt prompt,
Bundle extras)
Create a new confirmation request.
|
Modifier and Type | Method and Description |
---|---|
void |
onConfirmationResult(boolean confirmed,
Bundle result)
Handle the confirmation result.
|
cancel, getActivity, getContext, getName, onAttached, onCancel, onDetached, toString
public ConfirmationRequest(VoiceInteractor.Prompt prompt, Bundle extras)
prompt
- Optional confirmation to speak to the user or null if nothing
should be spoken.extras
- Additional optional information or null.public ConfirmationRequest(CharSequence prompt, Bundle extras)
prompt
- Optional confirmation to speak to the user or null if nothing
should be spoken.extras
- Additional optional information or null.public void onConfirmationResult(boolean confirmed, Bundle result)
confirmed
- Whether the user confirmed or rejected the operation.result
- Additional result information or null.