Skip to content
Advertisement

How to access database on Android app without root

I’m developing a small app with a database of 100 elements. I import the database but only in one emulator (of 3 witch I have) runs correctly. I found that it runs without problems because the “Songs.db” database exists in data/data/myapppackage/databases/ folder witch I can’t have access without rooting the device.

I search through internet for different approaches and solutions to this problem but nothing is working. I am new to android programming and for this kind of problem there isn’t any tutorial.

and on PlayerTurn class

The error message I get most of the times is android.database.sqlite.SQLiteException: no such table: songs_table (code 1): Can anyone help me? I spend almost 15 hours about that…

Advertisement

Answer

You can copy the DB into SD card, From SD card you can always access the DB

Try this code:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement