I have created a database android application it works correctly on emulator , but when Iam transferring it to my device it says that the table is not exist ,I have used 'openOrCreateDatabase() ' method , the database doesnt come with apk file ,when I run the ap, my database is read only, means I already have a lot of data in it and only need to see them
Asked
Active
Viewed 322 times
0
-
1Have you read this SO question as well as the links in it? http://stackoverflow.com/questions/8008327/how-to-copy-large-database-which-occupies-much-memory-from-assets-folder-to-my-a – Morrison Chang Dec 14 '12 at 20:55
-
thanks alot for your reply this link was so useful but what I didnt get is , do I have to move my data into assets folder or make a new database which copies all data in my existed database , and then run it ? or move the database file with apk file and make a link between them? – rabar kareem Dec 16 '12 at 20:18
1 Answers
0
Things in your apk file such as assets are read only so you can't use it as a live database. If you have data already in sqlite database, you will have to copy the data into the live database. If on the other hand you have it in some other format such as csv, you will have to create a reader which will add it into your live database.

Morrison Chang
- 11,691
- 3
- 41
- 77
-
thanks that was my point, I have created a database with SQLite database browser , and contains thousands of data , here what I got is I have to attach my existed one into mobile and while installing apk on mobile device make a new one that copies all data from my own and then it will be live database , and I think It'll be done by SQLiteOpenHelper am I right? – rabar kareem Dec 19 '12 at 13:00