Compilation Issue

aklisiewicz

Active Member
Licensed User
Longtime User
I have a project with an MP3 audio file which is about 20Mb. Since I have added the file to the project it takes very long to compile and install to the emulator. It seems that B4A tries to upload this file to the appropriate folder every time I try to run the App. Compliation/Installation time inceased from about 10sec to qbout 2min. Is there any way to prevent this mp3 file from uploading every time (if it already exists in the folder) ?

One other question: are the media file names case sensitive ? Another words if I refer MyFile.mp3 int the code and have myfile.mp3 in the folder, would it make a difference ?

Arthur
 
Last edited:

eps

Expert
Licensed User
Longtime User
Yes the filenames and directory names are case sensitive.

A 20MB MP3, really? If you really need such a large file, you might want to consider having it as a separate expansion file to your project. I haven't dealt with those, but see here for more info :

APK Expansion Files | Android Developers

although it might not yet work in B4A, but maybe it will just work for simple cases, see this post by Erel : http://www.b4x.com/forum/basic4android-updates-questions/23064-apk-file-expansion.html#post133867
 
Upvote 0

eps

Expert
Licensed User
Longtime User
Alternatively whilst developing and testing, debugging etc.. you could have a smaller version of the file say 1MB or quite a bit less, so that this speeds up the development process. Otherwise, if it's in Files it will upload it every time.

Can you not compress or downsample the MP3 in any way? It seems awfully large.
 
Upvote 0

aklisiewicz

Active Member
Licensed User
Longtime User
Files under the Files tab (asset files) are packaged inside the APK. Installing a 20mb APK on the emulator will be slow.

You can copy the mp3 file to File.DirRootExternal and then remove it from the Files tab.

yes, this sounds reasonable, the only question is where exactly I need to copy the file:
1. Emulator on the PC ?
2. Connected device ?
what folders ?

Art
 
Upvote 0

aklisiewicz

Active Member
Licensed User
Longtime User
thanks but my question was:

where the mp3 file should reside on
- device
- in PC (running emulator)

what folders?
Art
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
thanks but my question was:

where the mp3 file should reside on
- device
- in PC (running emulator)

what folders?
Art

Use "trial and error" method. That is what I do. When you have found out, please let me know where it should be copied since I am interested. Thanks!
 
Upvote 0
Top