You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/05/01 10:58:10 UTC

[GitHub] [cordova-plugin-media] MadyAkira opened a new issue #277: [Android only] Audio file doesn't play

MadyAkira opened a new issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277


   ```
   import {Media, MediaObject} from "@ionic-native/media/ngx";
   
     constructor(
         private media: Media,
     ) { }
   ```
   
   ```
         const mp3file: MediaObject = this.media.create(url);
         mp3file.play();
   ```
   
   On iOs the code above is working properly, however on Android no sound is coming out and I have no error message.
   
   Any idea ?
   
   _Ionic:
   
      Ionic CLI                     : 5.4.15
      Ionic Framework               : @ionic/angular 5.0.0
      @angular-devkit/build-angular : 0.803.23
      @angular-devkit/schematics    : 8.1.3
      @angular/cli                  : 8.1.3
      @ionic/angular-toolkit        : 2.1.2
   
   Cordova:
   
      Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
      Cordova Platforms : android 8.1.0, browser 6.0.0, ios 5.0.1
      Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 11 other plugins)
   
   Utility:
   
      cordova-res                          : not installed
      native-run (update available: 1.0.0) : 0.2.8
   
   System:
   
      Android SDK Tools : 26.1.1 (/Users/merwanropers/Library/Android/sdk)
      ios-deploy        : 1.9.4
      NodeJS            : v14.0.0 (/usr/local/Cellar/node/14.0.0/bin/node)
      npm               : 6.14.4
      OS                : macOS Catalina
      Xcode             : Xcode 11.4 Build version 11E146_


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] jawinn edited a comment on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
jawinn edited a comment on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-624199543


   We're also unable to play audio on Android in our Ionic app, either by local file or external URL. iOS audio plays fine.
   
   To see the error code with the Ionic Native wrapper plugin around Media, you can use:
   ```
   this.mp3file.onError.subscribe(err => {
         console.error('sound file ERROR', err);
   });
   ```
   Are you getting the Error code 1?


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] karmdip-mi edited a comment on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
karmdip-mi edited a comment on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-1062577644


   > 
   Hello  @Merwan1010
   
   
   I did the same code (https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-624503732) in My Application But Audio file is not playing
   
   ```mp3file.release(); // Don't forget to release ! Otherwise the audio won't play on Android after a certain amount of media created.```
   
   But I just debugged the code for the resolve the issue at that time I Just comment that `mp3file.release()` and audio file is playing fine so I am confused as per plugin it's must release the file in Android but it's working fine after comment that particular line So can you please guide me for this
   
   Thanks!


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] brunocbatista commented on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
brunocbatista commented on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-637087049


   (Sorry for any mistake, English is not my official language.)
   
   I have a solution for android 10.
   
   1. Add to your <edit-config> in the config.xml file:
                  <application android: requestLegacyExternalStorage = "true">
                  </application>
   
   2. Make sure that the build.gradle in the / platforms / android / folder has the variables configured for sdk api level 29:
                defaultBuildToolsVersion = "29.0.0"
                defaultMinSdkVersion = 19
                defaultTargetSdkVersion = 29
                defaultCompileSdkVersion = 29
   
   3. Finally, make sure your build is running at sdk's api level 29.
   
   The error happens due to a lack of android permission on the external storage folder (android 10 updates).
   
   Links that I used as a basis to develop the solution
   https://medium.com/@sriramaripirala/android-10-open-failed-eacces-permission-denied-da8b630a89df
   https://github.com/geosparks/geospark-cordova-example/issues/3#issuecomment-558510384


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] brunocbatista commented on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
brunocbatista commented on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-633661884


   I have the same problem on Android 10. In all other systems the audio is recorded normally, only in android 10 I have the code 1 as return.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] jdnichollsc commented on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
jdnichollsc commented on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-704692513


   Ok, this is working now :) https://gist.github.com/jdnichollsc/9d450ee36d9d75b201c01549f8f36fd7#file-record-audio-ts


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] brunocbatista edited a comment on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
brunocbatista edited a comment on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-637087049


   (Sorry for any mistake, English is not my official language.)
   
   I have a solution for android 10.
   
   1. Add to your <edit-config> in the config.xml file:
                 ` <application android:requestLegacyExternalStorage="true" />`
   
   2. Make sure that the build.gradle in the / platforms / android / folder has the variables configured for sdk api level 29:
                defaultBuildToolsVersion = "29.0.0"
                defaultMinSdkVersion = 19
                defaultTargetSdkVersion = 29
                defaultCompileSdkVersion = 29
   
   3. Finally, make sure your build is running at sdk's api level 29.
   
   The error happens due to a lack of android permission on the external storage folder (android 10 updates).
   
   Links that I used as a basis to develop the solution
   https://medium.com/@sriramaripirala/android-10-open-failed-eacces-permission-denied-da8b630a89df
   https://github.com/geosparks/geospark-cordova-example/issues/3#issuecomment-558510384


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] brunocbatista edited a comment on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
brunocbatista edited a comment on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-637087049


   (Sorry for any mistake, English is not my official language.)
   
   I have a solution for android 10.
   
   1. Add to your <edit-config> in the config.xml file:
                  <application android:requestLegacyExternalStorage="true" />
   
   2. Make sure that the build.gradle in the / platforms / android / folder has the variables configured for sdk api level 29:
                defaultBuildToolsVersion = "29.0.0"
                defaultMinSdkVersion = 19
                defaultTargetSdkVersion = 29
                defaultCompileSdkVersion = 29
   
   3. Finally, make sure your build is running at sdk's api level 29.
   
   The error happens due to a lack of android permission on the external storage folder (android 10 updates).
   
   Links that I used as a basis to develop the solution
   https://medium.com/@sriramaripirala/android-10-open-failed-eacces-permission-denied-da8b630a89df
   https://github.com/geosparks/geospark-cordova-example/issues/3#issuecomment-558510384


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] jawinn edited a comment on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
jawinn edited a comment on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-624199543


   We're also unable to play audio on Android, either by local file or external URL.
   To see the error code with the Ionic Native wrapper around Media, you can use:
   ```
   this.mp3file.onError.subscribe(err => {
         console.error('sound file ERROR', err);
   });
   ```
   Are you getting the Error code 1?


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] jawinn edited a comment on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
jawinn edited a comment on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-624199543


   We're also unable to play audio on Android in our Ionic app, either by local file or external URL. iOS audio plays fine.
   
   To see the error code with the Ionic Native wrapper around Media, you can use:
   ```
   this.mp3file.onError.subscribe(err => {
         console.error('sound file ERROR', err);
   });
   ```
   Are you getting the Error code 1?


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] jdnichollsc commented on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
jdnichollsc commented on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-704018234


   Hello folks,
   I'm creating a file with **cordova-plugin-file**:
   ```ts
   
   const path = this.file.cacheDirectory;
   const name = `record_audio.wav`;
   this.audioFile = await this.file.createFile(path, name, true);
   ```
   then I'm recording audio using that file with **cordova-plugin-media**
   ```ts
   this.audioMediaSrc = this.audioFile.nativeURL.replace(/^file:[\/]+/, '');
   this.audioMedia = this.media.create(this.audioMediaSrc);
   this.audioMedia.startRecord();
   ```
   And I already have **requestLegacyExternalStorage**:
   ```xml
   <preference name="android-minSdkVersion" value="19" />
   <preference name="android-targetSdkVersion" value="29" />
   <preference name="AndroidPersistentFileLocation" value="Compatibility" />
   <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
       <application android:networkSecurityConfig="@xml/network_security_config" />
       <application android:requestLegacyExternalStorage="true" />
   </edit-config>
   ```
   
   But I'm getting these issues:
   ```
   2020-10-05 23:12:25.994 8428-8875/com.legalesolutions.defemil I/MediaRecorderJNI: setup
   2020-10-05 23:12:25.998 8428-8875/com.legalesolutions.defemil I/MediaRecorderJNI: setAudioSource(1)
   2020-10-05 23:12:26.025 8428-8875/com.legalesolutions.defemil I/MediaRecorderJNI: setAudioEncoder(3)
   2020-10-05 23:12:26.030 8428-8875/com.legalesolutions.defemil I/MediaRecorderJNI: setOutputFile
   2020-10-05 23:12:26.030 8428-8875/com.legalesolutions.defemil I/MediaRecorderJNI: prepare
   2020-10-05 23:12:26.038 8428-8875/com.legalesolutions.defemil I/MediaRecorderJNI: start
   2020-10-05 23:12:26.236 8428-8875/com.legalesolutions.defemil W/PluginManager: THREAD WARNING: exec() call to Media.startRecordingAudio blocked the main thread for 242ms. Plugin should use CordovaInterface.getThreadPool().
   2020-10-05 23:12:30.064 8428-8428/com.legalesolutions.defemil D/ViewRootImpl@27fedad[MainActivity]: ViewPostIme pointer 1
   2020-10-05 23:12:30.068 8428-8875/com.legalesolutions.defemil I/MediaRecorderJNI: stop
   2020-10-05 23:12:30.168 8428-8875/com.legalesolutions.defemil I/MediaRecorderJNI: native_reset
   2020-10-05 23:12:30.168 8428-8875/com.legalesolutions.defemil D/AudioPlayer: stopping recording
   2020-10-05 23:12:30.171 8428-8875/com.legalesolutions.defemil D/AudioPlayer: size = 1
   2020-10-05 23:12:30.171 8428-8875/com.legalesolutions.defemil D/AudioPlayer: renaming /storage/emulated/0/tmprecording-1601957546027.3gp to /storage/emulated/0/data/user/0/com.legalesolutions.defemil/cache/record_1601957545941.wav
   2020-10-05 23:12:30.172 8428-8875/com.legalesolutions.defemil W/System.err: java.io.FileNotFoundException: /storage/emulated/0/data/user/0/com.legalesolutions.defemil/cache/record_1601957545941.wav: open failed: ENOENT (No such file or directory)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at libcore.io.IoBridge.open(IoBridge.java:496)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at org.apache.cordova.media.AudioPlayer.moveFile(AudioPlayer.java:210)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at org.apache.cordova.media.AudioPlayer.stopRecording(AudioPlayer.java:311)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at org.apache.cordova.media.AudioHandler.stopRecordingAudio(AudioHandler.java:298)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at org.apache.cordova.media.AudioHandler.execute(AudioHandler.java:121)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at android.os.MessageQueue.nativePollOnce(Native Method)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at android.os.MessageQueue.next(MessageQueue.java:336)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at android.os.Looper.loop(Looper.java:197)
   2020-10-05 23:12:30.173 8428-8875/com.legalesolutions.defemil W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:67)
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/System.err: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/System.err:     at libcore.io.Linux.open(Native Method)
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/System.err:     at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/System.err:     at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/System.err:     at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/System.err:     at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:8002)
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/System.err:     at libcore.io.IoBridge.open(IoBridge.java:482)
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/System.err: 	... 14 more
   2020-10-05 23:12:30.174 8428-8875/com.legalesolutions.defemil W/PluginManager: THREAD WARNING: exec() call to Media.stopRecordingAudio blocked the main thread for 106ms. Plugin should use CordovaInterface.getThreadPool().
   ```
   
   Do you know why?
   Any help is really appreciated! <3


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] MadyAkira commented on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
MadyAkira commented on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-624503732


   Since i'm only loading file from URL, i managed to first download the file into the cacheDirectory using ionic-native-file, and use the nativeURL to load the media.
   
   If you are loading your file directly from the assets, try finding the path with the File plugin first.
   
   Here is my code : 
   
   ```
   import { File } from '@ionic-native/file/ngx';
   
   constructor(
     private media: Media,
     private file : File,
   ) { }
   ```
   
   ```
   playFromUrl(url : string) :void {
     let xhr = new XMLHttpRequest();
     xhr.responseType = 'blob';
     xhr.onload = (event) => {
       let blob = xhr.response;
       const path = this.file.cacheDirectory;
       this.file.writeFile(path, fileName, blob, {replace: true}).then(
         (res) => {
           const mp3file: MediaObject = this.media.create(res.nativeURL.replace(/^file:\/\//, '')); //error on ios without if not renaming the path
           mp3file.play();
           mp3file.onStatusUpdate.subscribe((status : number) => {
             if (status === 4) {
               mp3file.release(); // Don't forget to release ! Otherwise the audio won't play on Android after a certain amount of media created.
             }
           })
         },
         (err) => {console.log('err', err)},
       )
     };
     xhr.open('GET', url);
     xhr.send();
   }
   ```
   
   Tell me if you succeed ! 👍 


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] jawinn commented on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
jawinn commented on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-624199543


   We're also unable to play audio on Android, either by local file or external URL.
   To see the error code with the Ionic Native wrapper around Media, you can use:
   ```
   this. mp3file.onError.subscribe(err => {
         console.error('sound file ERROR', err);
   });
   ```
   Are you getting the Error code 1?


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] brunocbatista edited a comment on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
brunocbatista edited a comment on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-637087049


   (Sorry for any mistake, English is not my official language.)
   
   I have a solution for android 10.
   
   1. Add to your `<edit-config>` in the config.xml file:
                 ` <application android:requestLegacyExternalStorage="true" />`
   
   2. Make sure that the build.gradle in the **/platforms/android/** folder has the variables configured for sdk api level 29:
                defaultBuildToolsVersion = "29.0.0"
                defaultMinSdkVersion = 19
                defaultTargetSdkVersion = 29
                defaultCompileSdkVersion = 29
   
   3. Finally, make sure your build is running at sdk's api level 29.
   
   The error happens due to a lack of android permission on the external storage folder (android 10 updates).
   
   Links that I used as a basis to develop the solution
   https://medium.com/@sriramaripirala/android-10-open-failed-eacces-permission-denied-da8b630a89df
   https://github.com/geosparks/geospark-cordova-example/issues/3#issuecomment-558510384


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] jawinn edited a comment on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
jawinn edited a comment on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-624199543


   We're also unable to play audio on Android in our Ionic app, either by local file or external URL.
   To see the error code with the Ionic Native wrapper around Media, you can use:
   ```
   this.mp3file.onError.subscribe(err => {
         console.error('sound file ERROR', err);
   });
   ```
   Are you getting the Error code 1?


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-media] karmdip-mi commented on issue #277: [Android only] Audio file doesn't play

Posted by GitBox <gi...@apache.org>.
karmdip-mi commented on issue #277:
URL: https://github.com/apache/cordova-plugin-media/issues/277#issuecomment-1062577644


   > 
   Hello  @Merwan1010
   I did the same code in Application But Audio file is not playing
   
   ```mp3file.release(); // Don't forget to release ! Otherwise the audio won't play on Android after a certain amount of media created.```
   
   But I just debugged the code for the resolve the issue at that time I Just comment that `mp3file.release()` and audio file is playing fine so I am confused as per plugin it's must release the file in Android but it's working fine after comment that particular line So can you please guide me for this
   
   Thanks!


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org