asales Expert Licensed User Longtime User Nov 12, 2021 #1 My apps has mp3 files in DirAssets and works fine to load and play (using MediaPlayer). Now I created a new app, that need to be in AAB format, and put in Play Store. When I download the app and try to play the audio, I get this error: audio_activity_create (java line: 418) java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed at android.content.res.AssetManager.openAssetFd(Native Method) at android.content.res.AssetManager.openFd(AssetManager.java:363) at anywheresoftware.b4a.objects.MediaPlayerWrapper.loadAfterReset(MediaPlayerWrapper.java:76) at anywheresoftware.b4a.objects.MediaPlayerWrapper.Load(MediaPlayerWrapper.java:66) If I compile and test in APK format (that is not accept to the new apps in Play Store), it works. What could be the problem (in AAB format) and how I can solve it? Any support are welcome. Thanks.
My apps has mp3 files in DirAssets and works fine to load and play (using MediaPlayer). Now I created a new app, that need to be in AAB format, and put in Play Store. When I download the app and try to play the audio, I get this error: audio_activity_create (java line: 418) java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed at android.content.res.AssetManager.openAssetFd(Native Method) at android.content.res.AssetManager.openFd(AssetManager.java:363) at anywheresoftware.b4a.objects.MediaPlayerWrapper.loadAfterReset(MediaPlayerWrapper.java:76) at anywheresoftware.b4a.objects.MediaPlayerWrapper.Load(MediaPlayerWrapper.java:66) If I compile and test in APK format (that is not accept to the new apps in Play Store), it works. What could be the problem (in AAB format) and how I can solve it? Any support are welcome. Thanks.
asales Expert Licensed User Longtime User Nov 13, 2021 #2 I found the answer in this link: FileReader csv : FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed I would like to read a csv file. For that, I found CSVReader which I use like this : List myEntries = null; try { AssetFileDescriptor descriptor = getAssets().openFd("file.csv"); stackoverflow.com I got this problem because I removed the extension of the mp3 file and Android compress it. I put the extension in the name of the file and worked fine. Upvote 1
I found the answer in this link: FileReader csv : FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed I would like to read a csv file. For that, I found CSVReader which I use like this : List myEntries = null; try { AssetFileDescriptor descriptor = getAssets().openFd("file.csv"); stackoverflow.com I got this problem because I removed the extension of the mp3 file and Android compress it. I put the extension in the name of the file and worked fine.