nbruley opened a new issue, #401: URL: https://github.com/apache/cordova-plugin-media/issues/401
# Bug Report ## Problem I suspect I am not requesting the proper permissions somehow for the latest changes in Android in order to play mp3 files in my Cordova app. ### What is expected to happen? Play mp3 file. I believe this worked a long time ago but no longer works now... ### What does actually happen? Get error: ```/storage/emulated/0/Android/data/com.hablamedecristo.himnario2/files/test.mp3: open failed: ENOENT (No such file or directory)``` Note: when trying to access an mp3 file with cordova.file.applicationStorageDirectory, I get the error "java.net.ConnectException: Failed to connect to localhost/127.0.0.1:443" ## Information <!-- Include all relevant information that might help understand and reproduce the problem --> ### Command or Code <!-- What command or code is needed to reproduce the problem? --> I have test.mp3 saved in the android/platform_www directory ``` function playDownloadedAudio (fileTransferWebUrl, thisElement) { my_media = new Media("test.mp3", function () //success; { }, function (error) //error { alertOK(translate('Error in playback. Please contact support. \n Code: ','text') + error.code + '\n '+translate('Message:','text')+' '+error.message + '\n'); playing = false; } ); my_media.play(); } ``` config.xml ``` <?xml version='1.0' encoding='utf-8'?> <widget id="com.hablamedecristo.himnario2" version="6.9.0" versionCode="77" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>X</name> <description> X </description> <author email="X" href="X"> X </author> <content src="index.html" /> <preference name="android-installLocation" value="preferExternal" /> <preference name="AndroidPersistentFileLocation" value="Compatibility" /> <!-- use "Internal" instead of "Compatibility" for new apps --> <preference name="android-targetSdkVersion" value="34" /> <preference name="android-compileSdkVersion" value="34" /> <preference name="android-minSdkVersion" value="23" /> <preference name="AndroidGradlePluginVersion" value="8.5.1" /> <preference name="loadUrlTimeoutValue" value="700000" /> <preference name="scheme" value="https" /> <preference name="hostname" value="localhost" /> <plugin name="cordova-plugin-media" spec="7.0.0" /> <plugin name="cordova-plugin-insomnia" /> <plugin name="cordova-plugin-file" /> <plugin name="cordova-plugin-email-composer" /> <!--<plugin name="cordova-plugin-wkwebview-file-xhr" spec="3.1.1" />--> <plugin name="cordova-plugin-file-transfer" /> <icon src="icon.png" /> <allow-navigation href="*" /> <access origin="*" /> <access origin="file:///*" /> <access origin="cdvfile://*" /> <allow-intent href="file:///*" /> <allow-intent href="cdvfile://*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="mailto:*" /> <!-- not sure if these are needed https://developer.android.com/training/data-storage/shared/media#kotlin --> <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" /> <platform name="android"> <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application"> <application android:usesCleartextTraffic="true" /> </edit-config> <allow-intent href="market:*" /> <preference name="FadeSplashScreenDuration" value="0"/> <preference name="SplashScreenDelay" value="0" /> <preference name="AndroidWindowSplashScreenBackground" value="#9D9D9C" /> </platform> <platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> </platform> </widget> ``` ### Environment, Platform, Device <!-- In what environment, on what platform or on which device are you experiencing the issue? --> Android Target SDK = 34 Galaxy Tab A7, Android 12 ### 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. --> Cordova version 12.0.0 cordova-media-plugin version 7.0.0 cordova-plugin-file version 8.1.0 cordova-plugin-file-transfer version 2.0.0 Android Studio Koala 2024.1.1 Patch 2 ## Checklist <!-- Please check the boxes by putting an x in the [ ] like so: [x] --> - [x] I searched for existing GitHub issues - [ ] I updated all Cordova tooling to most recent version - [x] 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. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org