Hi,
We are using JavaScript in WebView to recording audio in our app. This function work fine in the browser. However, when the app is built and tested on Android and iOS, it doesn’t work. The error we receive is Permission Denied. Given below is the code that triggers audio recording and permissions in the build settings. Can anyone help with this?
JavaScript Code:
navigator.mediaDevices.getUserMedia({ audio: true }) .then(onMicrophoneCaptured) .catch(onMicrophoneError);
Permissions added in build.settings:
usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "com.android.vending.CHECK\_LICENSE", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.MICROPHONE", "android.permission.RECORD\_AUDIO", "android.permission.MODIFY\_AUDIO\_SETTINGS", "android.hardware.audio.pro", "android.hardware.microphone" },