1

Possible Duplicate:
How to use my own sqlite database?
Full Android Database Helper class for existing SQLite database?

I am new to android, i have created database using sqlite database browser now i want to use this database in my application so what are the step to do so any example code or any help will be appriciated

Community
  • 1
  • 1
CodingRat
  • 1,934
  • 3
  • 23
  • 43
  • Greg Hewgill i have followed this tutorial http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ but it is not working for me because my database is very big more than 1.2 mb the capacity of assets folder so i am bit concern ? is there any other approch instead of this – CodingRat May 09 '12 at 05:43
  • please check this: [Use existing SQLite Database](http://stackoverflow.com/search?q=android+use+existing+sqlite+database) – Paresh Mayani May 09 '12 at 06:10
  • Answer is here: http://stackoverflow.com/questions/9109438/using-already-created-database-with-android/9109728#9109728 – Yaqub Ahmad May 09 '12 at 16:28

1 Answers1

0

Follow the instructions from this blog

It will walk you through all the steps you need to use to get a pre-created db into your app.

EDIT

You didn't mention that your db was large in the initial post. In that case you might want to try android-sqlite-asset-helper

I don't see where it says it, but I know I've seen Mark from CommonsWare comment that it will transfer any size file for you. You zip up the db, put it in your assets/databases folder, and follow their directions to code your db class and you should be good to go.

Barak
  • 16,318
  • 9
  • 52
  • 84
  • yes i am following the same blog but as i have mentioned that my database is big so that is the problem. is there any alternative instead of breaking database into part or keeping into asset folders – CodingRat May 09 '12 at 05:50
  • @Gaurav Sharma, updated my answer with something that may be more helpful than my first attempt. :) – Barak May 09 '12 at 06:10