wzb6348 opened a new issue #213: URL: https://github.com/apache/cordova-plugin-media-capture/issues/213
# Bug Report ## Problem Hi guys. i am an ionic beginner, i tried to achieve recording, but error code 20 happened. i tried 2 ways of writing, neither worked. ### What is expected to happen? successful recording ### What does actually happen? error code 20 ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> device/virtual device logcat: 2021-03-27 17:41:17.554 13689-13689/io.ionic.starter W/CordovaInterfaceImpl: Got an activity result, but no plugin was registered to receive it.  ### Command or Code <!-- What command or code is needed to reproduce the problem? --> code1 record() { let options: CaptureAudioOptions = { limit: 1, duration: 15 } navigator['device'].capture.captureAudio((mediaFiles: MediaFile[]) => { var i, len; for (i = 0, len = mediaFiles.length; i < len; i += 1) { alert(mediaFiles[i].fullPath); } }, (error) => {alert(error.code + error.message)}, options); } code2 record() { let options: CaptureAudioOptions = { limit: 1, duration: 15 } this.mediaCapture.captureAudio(options).then( (mediaFiles: MediaFile[]) => { var i, len; for (i = 0, len = mediaFiles.length; i < len; i += 1) { alert(mediaFiles[i].fullPath); } }, (error: CaptureError) => { alert(error.code) } ); } ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Cordova version: 10.0.0 ionic cli: CLI 6.13.1 android:device-10, virtual device-11 cordova-plugin-media-capture 3.0.3 "Capture" ### Version information <!-- What are relevant versions you are using? For example: Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins Other Frameworks: Ionic Framework and CLI version Operating System, Android Studio, Xcode etc. --> ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [ ] I searched for existing GitHub issues - [ ] I updated all Cordova tooling to most recent version - [ ] I included all the necessary information above -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
