Repository navigation
fix(app): declare the microphone so voice input can record in the apps - #2035
Conversation
Capacitor's WebChromeClient asks for RECORD_AUDIO and MODIFY_AUDIO_SETTINGS when a page opens the microphone, and Android refuses an undeclared permission without a prompt, so voice input in the Android app always failed with NotAllowedError. iOS needs NSMicrophoneUsageDescription before an app may record. Tested: debug APK lists both permissions (aapt2); on an Android emulator, turning voice input on showed the record-audio prompt and RECORD_AUDIO was granted after allowing; plutil -lint Info.plist; scripts/changelog-fold.test.ts Not-tested: dictation with real audio; iOS on a device or simulator
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
| Layer / File(s) | Summary |
|---|---|
Permission declarations and supporting text app/android/app/src/main/AndroidManifest.xml, app/ios/App/App/Info.plist, app/store/ios.md, changelog.d/app-microphone-permission.md |
Android declares RECORD_AUDIO and MODIFY_AUDIO_SETTINGS. iOS adds NSMicrophoneUsageDescription. The iOS store notes specify that microphone use is limited to voice input started with the mic button. The changelog records the permission changes. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Possibly related PRs
- devswha/ovis#1920: Adds macOS microphone usage text and an audio-input entitlement for dictation.
Suggested reviewers: devswha
Merge Risk: 
Minimal · previous review c8093
-
The microphone permission metadata and supporting text align with the stated voice-input behavior.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (4 skipped: 4 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Verified at c80932e. The Android manifest and iOS plist parse, and both now declare the microphone ( I pushed one docs commit, 98b4590, to the App Review note in |
|
Merge pass review report. Overall: PASSED. This outside contribution from @nahwan-kim declares the microphone so voice input can record in the Android and iOS apps. The maintainer approved the merge, and the gate (omo-native-gate-reviewer, gpt-6-astra) passed it. Gate verification:
A maintainer adds the changelog credit when the release folds the fragments (changelog.d/README.md). |
## Release 0.4.19 The release PR, made by the steps in [docs/development.md#releasing](docs/development.md#releasing), on main 9d76cca (#2078): - **Version:** `version` is 0.4.19 in `package.json` and `herdr-plugin.toml`. - **Changelog:** `bun scripts/changelog-fold.ts 0.4.19` moved the `changelog.d` fragments of 54 PRs into CHANGELOG.md, with PR links, and deleted them. - Outside contributors are credited: #1955 @YuuuXie, #1957 @Noobear, #1984 @bonecool999, #2003 @philipprass-prog, #2016 @kyop21, #2024 @YuuuXie, #2025 @YuuuXie, #2027 @jpcarranza94, #2030 @phlips5437, #2031 @yaaayaaa, #2034 @jpcarranza94, #2035 @nahwan-kim, #2041 @odfalik, #2045 @mattmarcin, #2052 @jpcarranza94, #2057 @kyop21, #2061 @YuuuXie. - **Release summaries:** `release-summaries.json` has the 0.4.19 entry in en, ko, ja and zh, with the same lists in each: 5 new, 5 improved, 5 fixed. Every English line is at most 70 characters. - **Remote bundle:** `REMOTE_BUNDLE_VERSION` goes from 37 to 38 in `shared/machines.ts`, because the remote bundle's inputs changed since `remote-v37`. Once this merges, `remote-v38` is pushed on the merge commit, and the Remote PC bundles workflow has to finish before the Release run. `bun scripts/release-guards.ts` reports: "Release 0.4.19: remote bundle, telemetry Worker and release metadata are in order." No telemetry Worker deploy is needed. `bun run check fast` passes locally. **Not checked on a real Windows PC:** #1989 (Git for Windows' OpenSSH for remote PCs) and #2016 (Antigravity chat on Windows through the Restart Manager) ship without their real-device Windows checks, because the maintainer's Windows test PC is off. The owner accepted releasing without them. Both will be checked on the real PC when it is back. The owner approved this release.
Change
Voice input never worked in the Android app: the mic button failed at once with "Microphone permission was denied", and the app's system settings had no microphone entry to allow.
When a page calls
getUserMedia({ audio: true }), Capacitor 8.5.3'sBridgeWebChromeClient.onPermissionRequestrequestsRECORD_AUDIOandMODIFY_AUDIO_SETTINGSat runtime. Neither was inAndroidManifest.xml, and Android refuses an undeclared permission without showing a prompt, so the web client always gotNotAllowedError.iOS has the same gap: Capacitor grants WebView media capture, but
Info.plisthad noNSMicrophoneUsageDescription, which iOS requires before an app records.AndroidManifest.xml: declareRECORD_AUDIOandMODIFY_AUDIO_SETTINGS.Info.plist: addNSMicrophoneUsageDescription.app/store/ios.md: list the microphone text, and say in the App Review note what the microphone is used for. The Play data safety answers inapp/store/android.mdalready cover voice recordings.Validation
./gradlew assembleDebug, thenaapt2 dump permissionson the APK: both permissions are listed.dumpsys packageshowsRECORD_AUDIO: granted=trueand the status bar shows the mic indicator. Before the change, the same step on a Galaxy Fold with the released app failed with no prompt.plutil -lint app/ios/App/App/Info.plist: OK.bun test scripts/changelog-fold.test.ts: 12 pass.-no-audio), and iOS on a device or simulator.