Skip to content

Most visited

Recently visited



public static class VoiceInteractor.ConfirmationRequest
extends VoiceInteractor.Request


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 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.


Public constructors

VoiceInteractor.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


added in API level 23
VoiceInteractor.ConfirmationRequest (VoiceInteractor.Prompt prompt, 
                Bundle extras)

Create a new confirmation request.

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

extras Bundle: Additional optional information or null.

Public methods


added in API level 23
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.

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

result Bundle: Additional result information or null.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Follow Google Developers on WeChat

Browse this site in ?

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

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

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)