I am creating an app, at first only for Android, that plays various guided meditation and yoga exercises in mp3 format using the "audio" control.
Part of the mp3 files are stored locally in the source, added to a subfolder inside WEB_RESSOURCES, and it works great. However, because of the APK 50mb size limitation, some other mp3 files have to be accessed via streaming, using external links pointing to my own web site.
I would like to avoid having to use streaming altogether.
I looked at this thread:
...which is what allowed me to find out about using the WEB_RESSOURCES folder, but I am not skilled enough to be able to use the phonegap tools mentioned by Kateryna at the bottom of the thread to download the extra audio after installation of the app, and I was looking for a simpler fix.
Then I read the documentation here about the APK expansion files, and it looks promising:
It seems that the best option, since there are several mp3 files, would be to zip them all together without compression, and it should then be possible to play each invidual file inside the zipped archive, as they write in the android.com link:
"Tip: If you're packaging media files into a ZIP, you can use media playback calls on the files with offset and length controls (such as MediaPlayer.setDataSource() and SoundPool.load()) without the need to unpack your ZIP. In order for this to work, you must not perform additional compression on the media files when creating the ZIP packages. For example, when using the zip tool, you should use the -n option to specify the file suffixes that should not be compressed:
zip -n .mp4;.ogg main_expansion media_files."
My question is: if I manage to create such an APK expansion file, how do I access the mp3 inside? What do I write under "src:" in the audio control properties?
Or do you have any other, simpler option, that would maybe also work for IOS and Windows Phone, that would allow to download the audio files separately?
Thanks a lot.