The database is not displayed in the DDMS folder when the real device is used instead of the emulator

I am creating an example application that will create a database, insert data, and finally display it in a spinner.

For testing, I use my Android phone instead of an emulator (since I get its slow response).

My problem is the successful execution of the application, but the spinner does not display the result. Also, I cannot view the folder structure in DDMS-> data.

I was confused if the database was created or not. Please suggest me how to view the database if we use a real device instead of emulatpor

+4
source share
3 answers

You have to start the emulator, view the emulator files in the DDMS view, then select File explorer, then go to data> data> com.your.package> databases> your_database_name, and a new tab will appear with your data! It will not work on a real device.

You can even pull / export a database and analyze it more efficiently with SQLite Browser

enjoy it!

+5
source

You cannot get the SQLite database file from a real Android device if it is not implemented. Since in order to access the folder with the data of your application you need to grant permission to it.

But you can run your application in the Android emulator, and as follows:

  • From DDMS, in the "Devices" menu, select your emulator.

  • You can see the data folder in Explorer.

    Path: data-> data-> Application Package Name-> Databases-> Database Name

+2
source

U just went to Windows Explorer> show view> File explorer> data> package> database name to see your database in the emulator

-one
source

Source: https://habr.com/ru/post/1498901/


All Articles