Repository navigation
Fix Android speech documentation errors (R100, pass 2) - #1786
Merged
jonathanpeppers merged 2 commits intoNov 24, 2026
Merged
jonathanpeppers merged 2 commits into
jonathanpeppers merged 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The documentation uses the invalid BCP 47 example en-UK in both the summary and remarks, which should be corrected to en-GB.
1 open issue
What changed in this PR
This documentation-only PR corrects six blocks in the .NET Android speech API reference, clarifying managed API contracts and recognition-support behavior.
Changes:
- Clarifies integer error codes and adds managed API links.
- Corrects service binding and support-check overload guidance.
- Clarifies executor dispatch and completes the locale-alternatives summary.
| File | Description |
|---|---|
docs/xml/Android.Speech/SpeechRecognizer.xml |
Clarifies support-result dispatch and completes the locale summary. |
docs/xml/Android.Speech/RecognitionService.xml |
Corrects binding behavior, API references, and overload guidance. |
docs/xml/Android.Speech/IRecognitionSupportCallback.xml |
Documents the integer error value and links its enum. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
@dalexsoto review |
dalexsoto
approved these changes
Nov 24, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
LGTM. All the edits match upstream AOSP and actual platform behavior, and the three files are well-formed XML.
IRecognitionSupportCallback.OnError: all 15ERROR_*codes (1–15) have matchingSpeechRecognizerErrormembers, so the enum cref and the "int value corresponds to a member" wording are correct.RecognitionService.OnBind:onBindisfinaland always returns the field-initializedmBinder, which is never nulled. I checked froyo through android16 and main. Dropping "may return null" is correct.OnCheckRecognitionSupportlinks: they resolve. LinkingSpeechRecognizerError.CannotCheckSupportis right becauseSpeechRecognizer.ErrorCannotCheckSupportis[Obsolete(..., true)].- Overload guidance: this matches dispatch. API 33 calls the two-parameter overload; API 34+ calls the three-parameter one, which delegates to the two-parameter one by default.
CheckRecognitionSupportexecutor:InternalSupportCallbacksends bothonSupportResultandonErrorthrough the executor.TopLocaleAlternativessummary: now matches upstream, with the agreeden-GBcorrection.
Non-blocking suggestions:
RecognitionService.xml(OnCheckRecognitionSupportthree-parameter remarks): consider adding that Android 13 only calls the two-parameter overload, so services supporting API 33 should override both.SpeechRecognizer.xml:503-504(DetectedLanguage): this summary was already cut off at "…(as defined by BCP 47, e.", the same problem fixed here forTopLocaleAlternatives. It could be completed the same way.<c>#DETECTED_LANGUAGE</c>in the new summary: this could be<see cref="F:Android.Speech.SpeechRecognizer.DetectedLanguage" />.
jonathanpeppers
deleted the
jonathanpeppers-review-android-speech-docs-r100-pass-2
branch
November 24, 2026 23:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
edbddb979d92ce929ac4dd5a2188c7ceabafec18<Docs>elements have zero exact placeholders.↑ The BCP 47 example now uses the IANA-listed
GBregion subtag;git diff --checkpasses.↓ Runtime tests do not apply to documentation-only changes.
Scope
Reviewed all 54 files in
Android.SpeechandAndroid.Speech.Tts. Audited 290 changed<Docs>blocks across 52 files; two other files had attribute-only changes. Corrected six blocks. Uncertain findings: none.Corrections
IRecognitionSupportCallback.OnError: describe the managedinterror value and link toSpeechRecognizerError.RecognitionService: remove the false null-return claim for its finalOnBind; correct recognition-support method and enum references; explain when to override each overload to preserve access toAttributionSource.SpeechRecognizer: describe the executor as dispatching support-query results to the support listener, complete the truncatedTopLocaleAlternativessummary, and replace the invaliden-UKexample withen-GBin the summary and remarks.Evidence
Compared with pinned Android SDK sources from
source-37.2_r01.zip(SHA-2569d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84):RecognitionService.java:217-224,404-430,507-512;RecognitionSupportCallback.java(onError(int));SpeechRecognizer.java:142-165,509-518. The IANA Language Subtag Registry (file date 2026-11-18) listsGBas the United Kingdom region subtag and has noUKregion entry: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry. Agemini-4-argonaudit reviewed all 290 changed blocks: 284 correct, six fixed, zero uncertain; usage records confirm the model. The follow-up review confirmed the BCP 47 correction.Checks
<Docs>elements; found zero exact placeholders.git diff --checkpassed.creftargets; noen-UKexamples remain inAndroid.Speech.