# Print output for @column tags ?> VoiceInteractor.ConfirmationRequest - Android SDK | Android Developers

Most visited


Recently visited


VoiceInteractor.ConfirmationRequest

public static class VoiceInteractor.ConfirmationRequest
extends VoiceInteractor.Request

java.lang.Object
   ↳ android.app.VoiceInteractor.Request
     ↳ android.app.VoiceInteractor.ConfirmationRequest


Confirms an operation with the user via the trusted system VoiceInteractionService. This allows an Activity to complete an unsafe operation that would require the user to touch the screen when voice interaction mode is not enabled. The result of the confirmation will be returned through an asynchronous call to either 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.

Summary


Public constructors

ConfirmationRequest(VoiceInteractor.Prompt prompt, Bundle extras)

Create a new confirmation request.

Public methods

void onConfirmationResult(boolean confirmed, Bundle result)

Handle the confirmation result.

Inherited methods

Public constructors


ConfirmationRequest

public ConfirmationRequest (VoiceInteractor.Prompt prompt, 
                Bundle extras)

Create a new confirmation request.

Parameters
prompt VoiceInteractor.Prompt: Optional confirmation to speak to the user or null if nothing should be spoken. This value may be null.

extras Bundle: Additional optional information or null. This value may be null.

Public methods


onConfirmationResult

public void onConfirmationResult (boolean confirmed, 
                Bundle result)

Handle the confirmation result. Override this method to define the behavior when the user confirms or rejects the operation.

Parameters
confirmed boolean: Whether the user confirmed or rejected the operation.

result Bundle: Additional result information or null.

Browse this site in English?

You requested a page in English, but your language preference for this site is English.

Would you like to change your language preference and browse this site in English? If you want to change your language preference later, use the language menu at the bottom of each page.