0

I have some really huge data that is required for my android app. I've put it into a sqlite db now. Roughly it is 39k rows and 5 columns. I want this data to be available for my app.

I'm kind of confused as to how I ship my app with it. i can ship the db file with it like discussed in this thread. or I can somehow create XML out of that data and ship it along. But the XML would be really huge. So what is the right way of doing it?

I do not want to download it after user installs the app. That'd be my last option if there are no better clean ways of doing it.

Community
  • 1
  • 1
Sudarshan Bhat
  • 3,772
  • 2
  • 26
  • 53
  • answer is here: http://stackoverflow.com/questions/9109438/using-already-created-database-with-android/9109728#9109728 – Yaqub Ahmad Apr 09 '12 at 09:07

3 Answers3

0

This should help you.

http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

Basically just ship the database with your apk file.

Kuffs
  • 35,581
  • 10
  • 79
  • 92
0

I think shipping your DB could make some problems with compatibility.

Maybe it will be better to use GZIP'ed SQL code bundled to your .APK? Or instead of XML for intermediate representation you can use google protobuf, which is most effective data representation format(Also, if you have a lot of strings, you can use it in combination with GZIP).

pepyakin
  • 2,217
  • 19
  • 31
0

Check the example here to achieve this functionality.

Community
  • 1
  • 1
Yaqub Ahmad
  • 27,569
  • 23
  • 102
  • 149