Android permission of creating database

Without any feedback in the error, it is impossible to tell you what's wrong in your code. Nevertheless, I can tell you that you do not need ACCESS_CHECKIN_PROPERTIES for using your own database. You should not need WRITE_EXTERNAL_STORAGE either unless you are trying to access the sdcard.

The databases are stored by default in a subfolder of your app folder in the internal storage, i.e.:

/data/data/YOUR_APP/databases/YOUR_DATABASAE.db

If you do that on a physical device it has to be rooted though.


I had exactly the same problem. My application would create a db on the emulator, read and write data, but it crashed when on the device.

I found a very simple solution to this: delete the database on your device manually at /data/data/YOUR_APP/databases/YOUR_DATABASAE.db and then rerun your app.

Worked in my case, hope it helps.