I want to record audio from Android, I have added the ionic native media plugin (https://ionicframework.com/docs/native/media/) with the following code :
public startAudioRecord() {
let options: CaptureAudioOptions = { duration: 10 };
this.mediaCapture.captureAudio(options).then(
(data: MediaFile[]) => console.log(data),
(err: CaptureError) => console.error(err)
);
}
But thanks to adb logcat I see that no android activity is found to handle Intent { act=android.provider.MediaStore
Anyone know how to process on Android?
04-21 11:30:46.668 4990 5054 E PluginManager: Uncaught exception from plugin
04-21 11:30:46.668 4990 5054 E PluginManager: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.provider.MediaStore
.RECORD_SOUND }
04-21 11:30:46.668 4990 5054 E PluginManager: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1899)
04-21 11:30:46.668 4990 5054 E PluginManager: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1589)
04-21 11:30:46.668 4990 5054 E PluginManager: at android.app.Activity.startActivityForResult(Activity.java:4228)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.apache.cordova.CordovaActivity.startActivityForResult(CordovaActivity.java:342)
04-21 11:30:46.668 4990 5054 E PluginManager: at android.app.Activity.startActivityForResult(Activity.java:4187)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.apache.cordova.CordovaInterfaceImpl.startActivityForResult(CordovaInterfaceImpl.java:66)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.apache.cordova.mediacapture.Capture.captureAudio(Capture.java:234)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.apache.cordova.mediacapture.Capture.execute(Capture.java:132)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
04-21 11:30:46.668 4990 5054 E PluginManager: at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:41)
04-21 11:30:46.668 4990 5054 E PluginManager: at android.os.Handler.dispatchMessage(Handler.java:102)
04-21 11:30:46.668 4990 5054 E PluginManager: at android.os.Looper.loop(Looper.java:154)
04-21 11:30:46.668 4990 5054 E PluginManager: at android.os.HandlerThread.run(HandlerThread.java:61)
04-21 11:30:46.690 4990 4990 D SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 143728 : No Activity found to handle Intent { act=android
.provider.MediaStore.RECORD_SOUND }
04-21 11:30:46.690 4990 4990 I chromium: [INFO:CONSOLE(143728)] “No Activity found to handle Intent { act=android.provider.MediaStore.RECORD_SOUND }”, source
: file:///android_asset/www/build/main.js (143728)