Added in API level 23

PickOptionRequest


class PickOptionRequest : VoiceInteractionSession.Request
kotlin.Any
   ↳ android.service.voice.VoiceInteractionSession.Request
   ↳ android.service.voice.VoiceInteractionSession.PickOptionRequest

A request for the user to pick from a set of option, as per VoiceInteractor.PickOptionRequest.

Summary

Public methods
Array<VoiceInteractor.PickOptionRequest.Option!>!

Return the set of options the user is picking from, as per VoiceInteractor.PickOptionRequest.

CharSequence?

Return the prompt informing the user of what they are picking, as per VoiceInteractor.PickOptionRequest.

VoiceInteractor.Prompt?

Return the prompt informing the user of what they are picking, as per VoiceInteractor.PickOptionRequest.

Unit

Report an intermediate option selection from the request, without completing it (the request is still active and the app is waiting for the final option selection), resulting in a call to VoiceInteractor.PickOptionRequest.onPickOptionResult with false for finished.

Unit

Report the final option selection for the request, completing the request and resulting in a call to VoiceInteractor.PickOptionRequest.onPickOptionResult with false for finished.

Inherited functions

Public methods

getOptions

Added in API level 23
fun getOptions(): Array<VoiceInteractor.PickOptionRequest.Option!>!

Return the set of options the user is picking from, as per VoiceInteractor.PickOptionRequest.

getPrompt

Added in API level 23
Deprecated in API level 23
fun getPrompt(): CharSequence?

Deprecated: Prefer getVoicePrompt() which allows multiple voice prompts.

Return the prompt informing the user of what they are picking, as per VoiceInteractor.PickOptionRequest.

Return
CharSequence? This value may be null.

getVoicePrompt

Added in API level 23
fun getVoicePrompt(): VoiceInteractor.Prompt?

Return the prompt informing the user of what they are picking, as per VoiceInteractor.PickOptionRequest.

Return
VoiceInteractor.Prompt? This value may be null.

sendIntermediatePickOptionResult

Added in API level 23
fun sendIntermediatePickOptionResult(
    selections: Array<VoiceInteractor.PickOptionRequest.Option!>!,
    result: Bundle!
): Unit

Report an intermediate option selection from the request, without completing it (the request is still active and the app is waiting for the final option selection), resulting in a call to VoiceInteractor.PickOptionRequest.onPickOptionResult with false for finished.

sendPickOptionResult

Added in API level 23
fun sendPickOptionResult(
    selections: Array<VoiceInteractor.PickOptionRequest.Option!>!,
    result: Bundle!
): Unit

Report the final option selection for the request, completing the request and resulting in a call to VoiceInteractor.PickOptionRequest.onPickOptionResult with false for finished. This finishes the request (it is no longer active).