Android APIs
public static class

VoiceInteractor.PickOptionRequest

extends VoiceInteractor.Request
java.lang.Object
   ↳ android.app.VoiceInteractor.Request
     ↳ android.app.VoiceInteractor.PickOptionRequest

Class Overview

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.

Summary

Nested Classes
class VoiceInteractor.PickOptionRequest.Option Represents a single option that the user may select using their voice. 
Public Constructors
VoiceInteractor.PickOptionRequest(VoiceInteractor.Prompt prompt, Option[] options, Bundle extras)
Create a new pick option request.
Public Methods
void onPickOptionResult(boolean finished, Option[] selections, Bundle result)
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

Public Constructors

public VoiceInteractor.PickOptionRequest (VoiceInteractor.Prompt prompt, Option[] options, Bundle extras)

Added in API level 23

Create a new pick option request.

Parameters
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.Options the user is selecting from.
extras Additional optional information or null.

Public Methods

public void onPickOptionResult (boolean finished, Option[] selections, Bundle result)

Added in API level 23

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.

Parameters
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.Options the user has narrowed the choices down to.
result Additional optional information.