We have shown you this in Eclipse, How to browse Android Emulator SQLite Database, but there is a little different in Android Studio when you browse Emulator’s SQLite database. There are also 2 ways to browse Emulator’s database in Android Studio
- View from the Android Studio with a plugin tool.
- Pull data out from Android Studio and view data with SQLite database Browser
View from the Android Studio with a plugin tool.
1. Go to this location to get the latest Questoid SQL Browser and save it to C:\Users\[username]\AppData\Local\Android\sdk\tools\lib\monitor-x86_64\plugins folder, Android Studio update manager will install any jar in this directory, if you like to uninstall it just simply delete the jar file.
2. Restart Android Studio.
3. And then click on Android Device Monitor
4. In the Android Device Monitor dialog, go to top , and navigate to Window > Show View , and then navigate > other > Questiod SQLite Manager.
5. You will notice an icon added on the right like the image below.
6. We’ll use the sample application from previous tutorial. Before you continue, please make sure your Emulator started, and then please navigate to data > data > com.instinctcoder.sqlitedbmultitbl > databases and then choose the file sqliteDBMultiTbl.db and click on the Questiod SQLite Manager and you will see another panel display on the left like image below.
Pull data out from eclipse and view data with SQLite database Browser
1. In Android Studio, DDMS icon has move into Android Device Monitor
2. Before you click the icon please start the Emulator first, as we pulling database out of it without it started, we can’t see anything in the dialog. Now, Click on Android Device Monitor icon and then click on DDMS icon and you will see the familiar dialog interface like the one in Eclipse.
3. At the right panel, please navigate to data > data > com.instinctcoder.sqlitedbmultitbl > databases and then choose the file sqliteDBMultiTbl.db
4. Next, on the top right corner, there is a phone icon looks like this
which is allow you to pull database from Emulator. click on the icon and save it into your hard disk.
5. We’ll use SQLite Browser, Click Open Existing Database file and then select sqliteDBMultiTbl.db. And then you are good to do whatever you want like to video above.