Viewing databases from Android Studio:

Edit: To view your database on an Emulator follow these steps (for actual device, scroll to the bottom):

  1. Download and install SQLiteBrowser.
  2. Open DDMS via Tools > Android > Android Device Monitor
  3. Click on your device on the left.
    You should see your application:

enter image description here

  1. Go to File Explorer (one of the tabs on the right), go to /data/data/databases

enter image description here

  1. Select the database by just clicking on it.
  2. Go to the top right corner of the Android Device Monitor window. Click on the ‘pull a file from the device‘ button:

enter image description here

  1. A window will open asking you where you want to save your database file. Save it anywhere you want on your PC.
  2. Now, open the SQLiteBrowser you installed. Click on ‘open database‘, navigate to the location you saved the database file, and open. You can now view the contents of your database.

To view your database on your mobile device:

Go to this Github repository and follow the instructions in the readme to be able to view your database on your device. What you get is something like this:

enter image description here

That’s it. It goes without saying however that you should undo all these steps before publishing your app.

5 سال پیش

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

این سایت از اکیسمت برای کاهش هرزنامه استفاده می کند. بیاموزید که چگونه اطلاعات دیدگاه های شما پردازش می‌شوند.