Stay organized with collections
Save and categorize content based on your preferences.
RecognitionSupportCallback
public
interface
RecognitionSupportCallback
android.speech.RecognitionSupportCallback
|
Used for receiving notifications from the SpeechRecognizer about the device support status for
the given recognition request.
Summary
Public methods |
abstract
void
|
onError(int error)
Notifies the caller about an error during the recognition support request
|
abstract
void
|
onSupportResult(RecognitionSupport recognitionSupport)
Notifies the caller about the support for the given request.
|
Public methods
onError
public abstract void onError (int error)
Notifies the caller about an error during the recognition support request
Parameters |
error |
int : Value is SpeechRecognizer.ERROR_NETWORK_TIMEOUT , SpeechRecognizer.ERROR_NETWORK , SpeechRecognizer.ERROR_AUDIO , SpeechRecognizer.ERROR_SERVER , SpeechRecognizer.ERROR_CLIENT , SpeechRecognizer.ERROR_SPEECH_TIMEOUT , SpeechRecognizer.ERROR_NO_MATCH , SpeechRecognizer.ERROR_RECOGNIZER_BUSY , SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS , SpeechRecognizer.ERROR_TOO_MANY_REQUESTS , SpeechRecognizer.ERROR_SERVER_DISCONNECTED , SpeechRecognizer.ERROR_LANGUAGE_NOT_SUPPORTED , SpeechRecognizer.ERROR_LANGUAGE_UNAVAILABLE , SpeechRecognizer.ERROR_CANNOT_CHECK_SUPPORT , or SpeechRecognizer.ERROR_CANNOT_LISTEN_TO_DOWNLOAD_EVENTS |
onSupportResult
public abstract void onSupportResult (RecognitionSupport recognitionSupport)
Notifies the caller about the support for the given request.
Parameters |
recognitionSupport |
RecognitionSupport : This value cannot be null . |
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nRecognitionSupportCallback\n==========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/speech/RecognitionSupportCallback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\n\n\ninterface\nRecognitionSupportCallback\n`\n\n\n`\n\n\n`\n\n|-------------------------------------------|\n| android.speech.RecognitionSupportCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nUsed for receiving notifications from the SpeechRecognizer about the device support status for\nthe given recognition request.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onError](/reference/android/speech/RecognitionSupportCallback#onError(int))`(int error) ` Notifies the caller about an error during the recognition support request |\n| ` abstract void` | ` `[onSupportResult](/reference/android/speech/RecognitionSupportCallback#onSupportResult(android.speech.RecognitionSupport))`(`[RecognitionSupport](/reference/android/speech/RecognitionSupport)` recognitionSupport) ` Notifies the caller about the support for the given request. |\n\nPublic methods\n--------------\n\n### onError\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onError (int error)\n```\n\nNotifies the caller about an error during the recognition support request\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `error` | `int`: Value is [SpeechRecognizer.ERROR_NETWORK_TIMEOUT](/reference/android/speech/SpeechRecognizer#ERROR_NETWORK_TIMEOUT), [SpeechRecognizer.ERROR_NETWORK](/reference/android/speech/SpeechRecognizer#ERROR_NETWORK), [SpeechRecognizer.ERROR_AUDIO](/reference/android/speech/SpeechRecognizer#ERROR_AUDIO), [SpeechRecognizer.ERROR_SERVER](/reference/android/speech/SpeechRecognizer#ERROR_SERVER), [SpeechRecognizer.ERROR_CLIENT](/reference/android/speech/SpeechRecognizer#ERROR_CLIENT), [SpeechRecognizer.ERROR_SPEECH_TIMEOUT](/reference/android/speech/SpeechRecognizer#ERROR_SPEECH_TIMEOUT), [SpeechRecognizer.ERROR_NO_MATCH](/reference/android/speech/SpeechRecognizer#ERROR_NO_MATCH), [SpeechRecognizer.ERROR_RECOGNIZER_BUSY](/reference/android/speech/SpeechRecognizer#ERROR_RECOGNIZER_BUSY), [SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS](/reference/android/speech/SpeechRecognizer#ERROR_INSUFFICIENT_PERMISSIONS), [SpeechRecognizer.ERROR_TOO_MANY_REQUESTS](/reference/android/speech/SpeechRecognizer#ERROR_TOO_MANY_REQUESTS), [SpeechRecognizer.ERROR_SERVER_DISCONNECTED](/reference/android/speech/SpeechRecognizer#ERROR_SERVER_DISCONNECTED), [SpeechRecognizer.ERROR_LANGUAGE_NOT_SUPPORTED](/reference/android/speech/SpeechRecognizer#ERROR_LANGUAGE_NOT_SUPPORTED), [SpeechRecognizer.ERROR_LANGUAGE_UNAVAILABLE](/reference/android/speech/SpeechRecognizer#ERROR_LANGUAGE_UNAVAILABLE), [SpeechRecognizer.ERROR_CANNOT_CHECK_SUPPORT](/reference/android/speech/SpeechRecognizer#ERROR_CANNOT_CHECK_SUPPORT), or [SpeechRecognizer.ERROR_CANNOT_LISTEN_TO_DOWNLOAD_EVENTS](/reference/android/speech/SpeechRecognizer#ERROR_CANNOT_LISTEN_TO_DOWNLOAD_EVENTS) \u003cbr /\u003e |\n\n### onSupportResult\n\nAdded in [API level 33](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onSupportResult (RecognitionSupport recognitionSupport)\n```\n\nNotifies the caller about the support for the given request.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------------------|-----------------------------------------------------------|\n| `recognitionSupport` | `RecognitionSupport`: This value cannot be `null`. \u003cbr /\u003e |"]]