App Has Many JPEGs. Best Way to Put Them on Device?

Bill Norris

Active Member
Licensed User
Longtime User
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?
 

parijs

Active Member
Licensed User
Longtime User
I have an app with 250 jpg and one off 410 jpg but never I will make an app without a dbase
 
Upvote 0

Bill Norris

Active Member
Licensed User
Longtime User
RE;

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.
 
Last edited:
Upvote 0

Jost aus Soest

Active Member
Licensed User
Longtime User
I personaly think, that downloading the pics to DirDefaultExternal is the best way.

BTW: How many MBs are we talking about?
Maybe it's possbile/necessary to download the pics in a lazy way, i. e. only in the moment when needed?
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
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.
 
Upvote 0

Bill Norris

Active Member
Licensed User
Longtime User
RE:

Yea, I pretty much assumed that the best way was to transfer to external from web server. Thanks to all for the input.
 
Upvote 0

Bill Norris

Active Member
Licensed User
Longtime User
RE:

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.
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
This is exactly why I used .zip Bill, only dealing with one file...
 
Upvote 0

NeoTechni

Well-Known Member
Licensed User
Longtime User
You dont need to add them 1 by 1 to the file manager.
Just put them in the Files folder of your project.

You can also use the marketplace's new expansion file feature.
 
Upvote 0

fatman

Active Member
Licensed User
Longtime User
Hi Bill,

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.


Fatman
 
Upvote 0
Top