Managing big amount of data (around 400Mb)
I am t开发者_如何学Chinking about developing a birds catalog for Android. It will contain many pictures and audio files, around 400Mb.
I am starting in this world but after some reading I didn't find too much info about such kind of applications. I have following questions:
1.- What kind of options do I have for installation? 400Mb downloaded from Android Market? Minimal installation from Android Market and in the first execution connect to a second server to download all the data? Other options?
2.- Which is the best way to store such amount of data? File system in the SD Card? SQLite DB?
3.- Is there any way to specify in the manifest file, the minimum file system space required to avoid failure installations (imagine you pay for the app, and the app doesn't install because there is no enough space)?
Any tip or pointer to documentation about this kind of applications will be appreciate.
Thanks in advance,
Chemi.
Well, I'm pretty sure that nobody wants to download that much content for an app onto his phone. Furthermore I think nobody actually will get to see all of the imagery during his app usage (that means he won't need it).
Because of this, wouldn't it be better to store the data on a server and fetch it on demand? Approximately everyone who has a smartphone does also have a data plan for his phone, so downloading the data shouldn't be a problem even if the user is outside.
Fetch on demand and store it in a database. That means however you will always have a good enough connection.
An option to download catalogs of types or families of birds they expect to see could be a good option.
Perhaps do as suggested in the other answers, fetch data on demand and save to a database. Here are some suggestions for the design:
Download a default content set upon installation based on the home country of the user (this info can probably be found on the phone?)
Add an option where a user can select and filter content to download based on rules like bird species, area, migratory routes, etc. This way a bird watcher could prepare for a trip beforehand if they know there's no reception available
Add an option where the user can delete all / selected content from the phone.
400mb is way too much for a default installation and I would skip this software.
Fetching all the files at first run time and doing incremental updates from time to time is probably the best here. You will need to build a "lastUpdateDate" web service that your app will query each time it starts but this is not very difficult.
As you would like to encrypt the data and as you plan to use this data as files, I think the best is that you save the received bytes to the SD card as encrypted files.
精彩评论