Stay organized with collections
Save and categorize content based on your preferences.
RecognitionSupportCallback
interface RecognitionSupportCallback
Used for receiving notifications from the SpeechRecognizer about the device support status for the given recognition request.
Summary
Public methods |
abstract Unit |
Notifies the caller about an error during the recognition support request
|
abstract Unit |
Notifies the caller about the support for the given request.
|
Public methods
onError
abstract fun onError(error: Int): Unit
Notifies the caller about an error during the recognition support request
Parameters |
error |
Int: Value is android.speech.SpeechRecognizer#ERROR_NETWORK_TIMEOUT , android.speech.SpeechRecognizer#ERROR_NETWORK , android.speech.SpeechRecognizer#ERROR_AUDIO , android.speech.SpeechRecognizer#ERROR_SERVER , android.speech.SpeechRecognizer#ERROR_CLIENT , android.speech.SpeechRecognizer#ERROR_SPEECH_TIMEOUT , android.speech.SpeechRecognizer#ERROR_NO_MATCH , android.speech.SpeechRecognizer#ERROR_RECOGNIZER_BUSY , android.speech.SpeechRecognizer#ERROR_INSUFFICIENT_PERMISSIONS , android.speech.SpeechRecognizer#ERROR_TOO_MANY_REQUESTS , android.speech.SpeechRecognizer#ERROR_SERVER_DISCONNECTED , android.speech.SpeechRecognizer#ERROR_LANGUAGE_NOT_SUPPORTED , android.speech.SpeechRecognizer#ERROR_LANGUAGE_UNAVAILABLE , android.speech.SpeechRecognizer#ERROR_CANNOT_CHECK_SUPPORT , or android.speech.SpeechRecognizer#ERROR_CANNOT_LISTEN_TO_DOWNLOAD_EVENTS |
onSupportResult
abstract fun onSupportResult(recognitionSupport: RecognitionSupport): Unit
Notifies the caller about the support for the given request.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# RecognitionSupportCallback\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nRecognitionSupportCallback\n==========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/speech/RecognitionSupportCallback \"View this page in Java\") \n\n```\ninterface RecognitionSupportCallback\n```\n\n|------------------------------------------------|\n| [android.speech.RecognitionSupportCallback](#) |\n\nUsed for receiving notifications from the SpeechRecognizer about the device support status for the given recognition request.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onError](#onError(kotlin.Int))`(`error:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Notifies the caller about an error during the recognition support request |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSupportResult](#onSupportResult(android.speech.RecognitionSupport))`(`recognitionSupport:` `[RecognitionSupport](/reference/kotlin/android/speech/RecognitionSupport)`)` Notifies the caller about the support for the given request. |\n\nPublic methods\n--------------\n\n### onError\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onError(error: Int): Unit\n```\n\nNotifies the caller about an error during the recognition support request\n\n| Parameters ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `error` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is [android.speech.SpeechRecognizer#ERROR_NETWORK_TIMEOUT](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_NETWORK_TIMEOUT:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_NETWORK](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_NETWORK:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_AUDIO](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_AUDIO:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_SERVER](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_SERVER:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_CLIENT](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_CLIENT:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_SPEECH_TIMEOUT](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_SPEECH_TIMEOUT:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_NO_MATCH](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_NO_MATCH:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_RECOGNIZER_BUSY](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_RECOGNIZER_BUSY:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_INSUFFICIENT_PERMISSIONS](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_INSUFFICIENT_PERMISSIONS:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_TOO_MANY_REQUESTS](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_TOO_MANY_REQUESTS:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_SERVER_DISCONNECTED](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_SERVER_DISCONNECTED:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_LANGUAGE_NOT_SUPPORTED](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_LANGUAGE_NOT_SUPPORTED:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_LANGUAGE_UNAVAILABLE](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_LANGUAGE_UNAVAILABLE:kotlin.Int), [android.speech.SpeechRecognizer#ERROR_CANNOT_CHECK_SUPPORT](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_CANNOT_CHECK_SUPPORT:kotlin.Int), or [android.speech.SpeechRecognizer#ERROR_CANNOT_LISTEN_TO_DOWNLOAD_EVENTS](/reference/kotlin/android/speech/SpeechRecognizer#ERROR_CANNOT_LISTEN_TO_DOWNLOAD_EVENTS:kotlin.Int) |\n\n### onSupportResult\n\nAdded in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSupportResult(recognitionSupport: RecognitionSupport): Unit\n```\n\nNotifies the caller about the support for the given request.\n\n| Parameters ||\n|----------------------|---------------------------------------------------------------------------------------------------------|\n| `recognitionSupport` | [RecognitionSupport](/reference/kotlin/android/speech/RecognitionSupport): This value cannot be `null`. |"]]