Show Or See SQLite Database In Android Studio Example
Hello, developers. Welcome to browse or view SQLite database in Android Studio Example.
Browse or view SQLite database in Android tutorial guides you to see or show whole SQLite database from Android Studio.
If you are making medium or large android project with SQLite, then you will need to view whole SQLite database.
At the end of the tutorial, you will be able to browse all tables, it’s columns and it’s rows.
Learning to Browse or View SQLite database in Android Studio Tutorial step by step
Step 1: Open a project in Android Studio.
Step 2: Opening Android Device Monitor.
In Android Studio, click on Android Device Monitor icon as shown in below image.
Now your android device monitor should start. If it doesn’t, then follow below steps(for windows.)
Go to directory(inside orange square) as shown in following image.
Now right click on monitor and select “Run as administrator” as below image.
Now Android Device Monitor will start.
Note: If you find error like “Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it’s being used by something else, choose a new port number in the preferences.”, click here for more reference.
Step 3: Going through database file in device monitor.
Now select device or emulator from left panel, then select File Explorer from upper right tab bar.
Now select data->data as shown in following image.
Find your project’s package name as shown in below image.
After finding package name, click on that name. You will see following structure.
My database name is “user_database“. You should find your database here.
Single click on database name and then click on upper right icon as shown in above image to export database file.
After clicking on that button following will open.
After saving, it is time to open this database file.
Step 4: Opening Database File
We will need Sqlitebrowser software to open database file.
Download Sqlitebrowser software from this link: sqlitebrowser.org
Install and open Sqlitebrowser. See below image to open database(File-> Open Database…).
After clicking Open Database, following will open. Select All Files as shown in below image.
Select your database file and open it.
Step 5: Browsing Tables.
From tab bar, select “Browse Data“, then select table as shown in below image.
After selecting table finally, you will see table as shown in below image.
So that is all for browse or view SQLite database in Android example.
Feel free to comment your queries and reviews in the comment section. Thank you.