Added in API level 23

CompleteVoiceRequest


class CompleteVoiceRequest : VoiceInteractionSession.Request

A request to simply inform the user that the voice operation has completed, as per VoiceInteractor.CompleteVoiceRequest.

Summary

Public methods
CharSequence?

Return the message informing the user of the completion, as per VoiceInteractor.CompleteVoiceRequest.

VoiceInteractor.Prompt?

Return the message informing the user of the completion, as per VoiceInteractor.CompleteVoiceRequest.

Unit

Report that the voice interactor has finished completing the voice operation, resulting in a call to VoiceInteractor.CompleteVoiceRequest.onCompleteResult.

Inherited functions
Unit cancel()

Ask the app to cancel this current request. This also finishes the request (it is no longer active).

String! getCallingPackage()

Return the package name of the application that initiated the request.

Int getCallingUid()

Return the uid of the application that initiated the request.

Bundle! getExtras()

Return any additional extra information that was supplied as part of the request.

Boolean isActive()

Check whether this request is currently active. A request becomes inactive after calling cancel or a final result method that completes the request. After this point, further interactions with the request will result in java.lang.IllegalStateException errors; you should not catch these errors, but can use this method if you need to determine the state of the request. Returns true if the request is still active.

String toString()

Public methods

getMessage

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

Deprecated: Prefer getVoicePrompt() which allows a separate visual message.

Return the message informing the user of the completion, as per VoiceInteractor.CompleteVoiceRequest.

Return
CharSequence? This value may be null.

getVoicePrompt

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

Return the message informing the user of the completion, as per VoiceInteractor.CompleteVoiceRequest.

Return
VoiceInteractor.Prompt? This value may be null.

sendCompleteResult

Added in API level 23
fun sendCompleteResult(result: Bundle!): Unit

Report that the voice interactor has finished completing the voice operation, resulting in a call to VoiceInteractor.CompleteVoiceRequest.onCompleteResult. This finishes the request (it is no longer active).