tags:

views:

729

answers:

3

How to read data from the assets folder sqlite database file with .sqlite extension in my Android application?

+1  A: 

You will need to copy the database someplace else, such as to your project's databases directory. This example shows copying two files -- in your case, rather than a file as your source, it would be an InputStream pointing to the asset.

CommonsWare
Thanks a lot...i solved it..
Ashish Mishra
A: 

If you like more details (like I did), here is a good tutorial.

Ivo van der Wijk
A: 

If you are planning to create a new SQLite database then over ride and implement the onCreate() Method as shown in the tutorial.

But if you are using a SQLite database that is created by another external source and you are going to pull it down, then leave the onCreate() method empty.

franklins