Rohan Deokar
Rohan Deokar

Reputation: 49

SQlite with Android

If I create the SQLite DB and tables with some data at the time of developement then build the apk of that app,Does that tables and data will remain the same when I install that apk on android Device?

Upvotes: 0

Views: 283

Answers (4)

dreamer1989
dreamer1989

Reputation: 1115

The thing that you need to understand is that your application doesn't get ported with a database. It will be created on the device when your application runs for the first time. That's why the onCreated() method runs just once.

Upvotes: 0

Dipak Keshariya
Dipak Keshariya

Reputation: 22291

Please see below link for copy database from your assets folder.

Using your own SQLite database in Android applications

Upvotes: 1

Snehal Poyrekar
Snehal Poyrekar

Reputation: 735

That is not the case..your database wont get ported on the device..

Upvotes: 0

Ferdau
Ferdau

Reputation: 1558

Yes, you should put your DB in the assets folder...

Upvotes: 0

Related Questions