0

We are trying to copy sqlite database stored in assets folder to local directory on actual phone but unable to do so. CheckDatabase tails us that database exists but code fails when we try to read data from phone. ( Also tried to view database through DDMS it doesn't show there)

Phone we have with OS 2.3.4

Saw that various folks have complained on StackOverflow but did not find any solution.

Is this related to https://code.google.com/p/android/issues/detail?id=949

Also tried below library

https://github.com/jgilfelt/android-sqlite-asset-helper

Sample code provided in this also fails while copying database and gives below error

sqlite3_open_v2("/mnt/sdcard/Android/data/com.sqliteassethelper.example/files/northwind", &handle, 2, NULL) failed
Shruti
  • 1
  • 13
  • 55
  • 95
Amod Gokhale
  • 2,346
  • 4
  • 17
  • 32

1 Answers1

0

Consider using this library , it will do the magic for you https://github.com/jgilfelt/android-sqlite-asset-helper Hope this would help you

Muhannad A.Alhariri
  • 3,702
  • 4
  • 30
  • 46