Built-in versus downloaded data files

mikelove

皇帝
Staff member
Quick question for all you Android experts.

We're currently debating whether to embed a basic set of data files (PLC and possibly also CC-CEDICT (or a subset of it)) directly in our app's .apk or download them from an outside server on first run. Since Android 2.1 and earlier didn't support installing apps on an SD card, downloading from an external server was the obvious choice for those, which is why so many other dictionary apps work that way, but as we're only targeting 2.2 and later it seems like building the files into the app would be quite reasonable, as long as we also tag the app to install to SD by default.

Advantages to built-in files:
  • Smoother installation - no annoying delay after you launch the app for the first time
  • Faster / more reliable download of those required files since they're coming from Google's servers
  • Easier support - won't have to worry about people with spotty internet connections not being able to use the app / having to wait 3 hours before it's ready
  • Easier for us to push updates to PLC to cover new words (something we're about to start doing more frequently) - no annoying prompt to download, you automatically have the latest version when you update the app
  • Modest bandwidth cost savings on our end since we're not pushing all those extra downloads from CloudFront (figure $0.01 per user, so $1000 per 100,000 downloads).

Advantages to downloading on first run:
  • Faster installation of minor updates
  • Smaller app size if you do want to keep it in internal memory
  • More consistent with other Android apps

Thoughts, anyone? Neither of these is particularly challenging programming-wise - we already have a perfectly good file downloading system for use with add-ons anyway - so we can look at it primarily as a usability decision (with a little bit of cost-saving thrown in).
 

leutnerm

Member
Hey!
First of all, thanks so much for Pleco. It is by far the best Chinese dictionary on Android! And I'm looking forward to more stuff.
As I'm using an HTC Desire, my space is limited. So, it would be kind of crucial for me to have a bigger Pleco apk. Maybe you could tell us, how big it would get with built-in files?
 

mikelove

皇帝
Staff member
leutnerm said:
Hey!
First of all, thanks so much for Pleco. It is by far the best Chinese dictionary on Android! And I'm looking forward to more stuff.
As I'm using an HTC Desire, my space is limited. So, it would be kind of crucial for me to have a bigger Pleco apk. Maybe you could tell us, how big it would get with built-in files?
You wouldn't need to have it in internal memory - the entire application could be stored on your SD card. Would probably be something in the 20-30 MB range, so clearly too big for the internal memory of a lot of devices, but it should be fine on any SD card.
 

ipsi

状元
I'd suggest that data files should be downloaded. It's not quite as convenient, true, but I think (not certain) that Android copies APK files to internal memory to install them, even if they're later moved to the SD card. I occasionally see "Low Space" messages while installing updates, which is why I think this might be the case. Assuming it is, then a 30MB Pleco APK would be tricky to install in a device with a little over 20MB of free internal memory (20MB seems to be when you start getting "Low Space" warnings).
 

mikelove

皇帝
Staff member
ipsi said:
I'd suggest that data files should be downloaded. It's not quite as convenient, true, but I think (not certain) that Android copies APK files to internal memory to install them, even if they're later moved to the SD card. I occasionally see "Low Space" messages while installing updates, which is why I think this might be the case. Assuming it is, then a 30MB Pleco APK would be tricky to install in a device with a little over 20MB of free internal memory (20MB seems to be when you start getting "Low Space" warnings).
We'll have to investigate this further... my impression was that that could be avoided by flagging an app to install to SD by default, but if that's not the case then we'd certainly want to keep the APK small. (we've seen similar errors with debug builds but didn't think they also applied with Android Market) But we're probably going to release Beta 3 with downloaded data files just so that we can get some proper testing if we do end up going that route in the finished app. Thanks.
 
Top