Declare microphone-related permissions for voice recording in AndroidManifest and handle runtime permission errors appropriately in Android app. Update versionCode to 133 and add localized strings for improved error messaging.

This commit is contained in:
MartinBraquet
2026-07-25 18:34:24 +02:00
parent 27b18e1d46
commit fb24068729
5 changed files with 27 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ android {
applicationId "com.compassconnections.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 132
versionCode 133
versionName "1.32.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {

View File

@@ -88,6 +88,18 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Voice auto-fill on the profile form. Capacitor's BridgeWebChromeClient already answers the
WebView's AUDIO_CAPTURE request by asking for these two at runtime, but Android silently
denies a runtime request for a permission that was never declared here — so getUserMedia
rejected with NotAllowedError and the web UI blamed the browser. -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<!-- Declaring RECORD_AUDIO implicitly marks android.hardware.microphone as required, which would
hide the app on Play from any device without a mic. Recording is one optional feature, so
keep distribution wide and let the UI degrade instead. -->
<uses-feature android:name="android.hardware.microphone" android:required="false" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
<!-- Firebase Cloud Messaging -->