# VoiceInteractionSession.CompleteVoiceRequest

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# CompleteVoiceRequest

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/service/voice/VoiceInteractionSession.CompleteVoiceRequest "View this page in Java")  

```
class CompleteVoiceRequest : VoiceInteractionSession.Request
```

|---|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                              |||
| ↳ | [android.service.voice.VoiceInteractionSession.Request](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request)                               ||
|   | ↳ | [android.service.voice.VoiceInteractionSession.CompleteVoiceRequest](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.CompleteVoiceRequest#) |

A request to simply inform the user that the voice operation has completed, as per[VoiceInteractor.CompleteVoiceRequest](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.CompleteVoiceRequest.html#).

## Summary

|                                                                                                                                                                                                                                                                                                                                              Public methods                                                                                                                                                                                                                                                                                                                                               ||
|--------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)?                     | [getMessage](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.CompleteVoiceRequest#getMessage())`()` Return the message informing the user of the completion, as per[VoiceInteractor.CompleteVoiceRequest](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.CompleteVoiceRequest.html#).                                                                                                                                                                                                                        |
| [VoiceInteractor.Prompt](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.Prompt.html#)? | [getVoicePrompt](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.CompleteVoiceRequest#getVoicePrompt())`()` Return the message informing the user of the completion, as per[VoiceInteractor.CompleteVoiceRequest](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.CompleteVoiceRequest.html#).                                                                                                                                                                                                                |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                                       | [sendCompleteResult](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.CompleteVoiceRequest#sendCompleteResult(android.os.Bundle))`(`result:` `[Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!`)` Report that the voice interactor has finished completing the voice operation, resulting in a call to[VoiceInteractor.CompleteVoiceRequest.onCompleteResult](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.CompleteVoiceRequest.html#onCompleteResult(android.os.Bundle)). |

| Inherited functions ||
|---|---|
| From class[Request](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request) |------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [cancel](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request#cancel())`()` <br /> Ask the app to cancel this current request. This also finishes the request (it is no longer active). <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!  | [getCallingPackage](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request#getCallingPackage())`()` <br /> Return the package name of the application that initiated the request. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [getCallingUid](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request#getCallingUid())`()` <br /> Return the uid of the application that initiated the request. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!  | [getExtras](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request#getExtras())`()` <br /> Return any additional extra information that was supplied as part of the request. <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isActive](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request#isActive())`()` <br /> Check whether this request is currently active. A request becomes inactive after calling[cancel](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request#cancel())or a final result method that completes the request. After this point, further interactions with the request will result in[java.lang.IllegalStateException](https://developer.android.com/reference/kotlin/java/lang/IllegalStateException.html#)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. <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)   | [toString](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.Request#toString())`()` <br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | ||

## Public methods

### getMessage

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getMessage(): CharSequence?
```

**Deprecated:** *Prefer[getVoicePrompt()](https://developer.android.com/reference/kotlin/android/service/voice/VoiceInteractionSession.CompleteVoiceRequest#getVoicePrompt())which allows a separate visual message.*

Return the message informing the user of the completion, as per[VoiceInteractor.CompleteVoiceRequest](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.CompleteVoiceRequest.html#).

|                                                          Return                                                          ||
|------------------------------------------------------------------------------------------------|--------------------------|
| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)? | This value may be`null`. |

### getVoicePrompt

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getVoicePrompt(): VoiceInteractor.Prompt?
```

Return the message informing the user of the completion, as per[VoiceInteractor.CompleteVoiceRequest](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.CompleteVoiceRequest.html#).

|                                                                    Return                                                                    ||
|--------------------------------------------------------------------------------------------------------------------|--------------------------|
| [VoiceInteractor.Prompt](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.Prompt.html#)? | This value may be`null`. |

### sendCompleteResult

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun sendCompleteResult(result: Bundle!): Unit
```

Report that the voice interactor has finished completing the voice operation, resulting in a call to[VoiceInteractor.CompleteVoiceRequest.onCompleteResult](https://developer.android.com/reference/kotlin/android/app/VoiceInteractor.CompleteVoiceRequest.html#onCompleteResult(android.os.Bundle)). This finishes the request (it is no longer active).