I have approx 200 jpeg files that my app needs access to, but I don't want them to be built in the APK. I am assuming the only(?) way to accomplish is to download them to DirDefaultExternal from a server via httputils or FTP. Any other suggestions?
Am not sure what you mean. My app has database as well. I don't want to add all of these jpegs with file manager so the apk is not so big. Plus, if any of the jpeg files are ever changed I can just download a new jpeg instead of creating new apk. Each record in database contains a field for the jpeg file name, and the jpeg gets loaded into imageview as needed. Maybe I should store the jpeg in a blob field? I'm not sure how that works.
If you don't want to package them into your apk then obviously the only other way is to get them from and external source. The best externalsource available is if course the internet.
I needed to packages an 'icon pack' in with my current app. I also didn't want to add all the files with files manager so I zipped the files. Added to .zip with files manager and then the app unzips the files on the device on first run.
Regarding zip, my experience has been that zipping up a bunch of jpgs doesn't really save that much space, but it may make sense though so you are only downloading one file, instead of individuals, which involves capturing all the file names, etc.
i wrote an app dealing with app. 2.500 jepgs related to 4.500 articles.
Both jpegs and sqlite tables are located on a sd-card.
As you mentioned the advantage of this is that one can simply exchchange single jpgs. I use a ftp-server for this purpose.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.