In my Ionic 2 application, I use the WebAudio API to record audio (based on https://github.com/mattdiamond/Recorderjs). This is working on Chrome and, after putting the right permissions in AndroidManifest.xml
:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
and requesting microphone access through the cordova.plugins.diagnostic
plugin, on Android version 6.0.1 (Samsung Galaxy S6).
However, it doesn't work on Android 4.2.2 (Samsung Galaxy S4) because it doesn't seem to support getUserMedia
, so I decided to install the crosswalk plugin:
ionic plugin add cordova-plugin-crosswalk-webview
After that I see getUserMedia
can be used (through a Modernizr check). However, now the audio recorder returns only silence (on both versions of Android). I have checked that the permissions are still set correctly. Any idea what could be wrong?