View the contents of a database created using the space save library

Is there an easier way to see the contents of the database created using the space save library in Android Studio?

+61
source share
9 answers

Method 1

You can use Android-Debug-Database , and you can use your CRUD data from the browser, and then you can see your preference data from the browser.

Method 2

, , , Genymotion. , . , , PLZ . fooobar.com/questions/1017758/.... , .

+33
Emulator -> Android Studio -> Device File Explorer -> /data/data/{$packageId}/databases/ -> Save As -> https://sqlitebrowser.org/
+53

3.1. *

" Device File explorer ". .

data/data/your-application-package/databases

3

your-database-name
your-database-name-shm
your-database-name-wal

3

( -database-name) sqlite.

.......

your-database-name-shm
your-database-name-wal

, ,

+38

SQLite

Android Studio> = 3.0:

File File Explorer :

> Windows >

" " :

> > PACKAGE_NAME >

PACKAGE_NAME - ( com.edgedevstudio.sample)

Device File Explorer

" ". .

SQLite, " " . enter image description here

" todolist ", "todolist-shm" "todolist-wal"

3 (db_name, db_name-shm & db_name-wal, db_name = ), .

+18

Android

Android Debug Database - Android.

build.gradle

debugImplementation 'com.amitshekhar.android:debug-db:1.0.4'

, logcat :

D/DebugDB: Open http://192.168.1.104:8080 in your browser

enter image description here


enter image description here


GitHub

+7

Stetho.

Android dependency.

Stetho.initializeWithDefaults(this) Application , Chrome. Chrome : chrome://inspect.

Presto! Room database.

+4

, :

1) .

https://sqlitebrowser.org/

2) Device File Explorer IDE , , : your-db, your-db-shm, your-db-wal

Ctrl + Shift + S - . .

3) , your-db DbBrowser.

+3
You can see your database tables on DB browser for SQLITE.

 In android studio 
1. Click on View -> Tool Windows -> Device File Explorer -> data
2. Select your project package name -> database -> select all file and save on desktop

Install **DB browser for SQLITE** 
1. sudo apt-get install sqlitebrowser //write on your terminal for install DB browser
2. install DB browser for sqlite
3. click on Open database and select file where you had saved your data
4. click on Brower Data and see your tables

This is all where i have see my android room database
+1

Sethto By Facebook.

Stetho - Android. , Chrome Chrome

You just need to enable the gradle dependency and call it in MainApp. It. You access all the tools in the Chrome window using chrome://inspect/, including your sqlite database.

Below is a screenshot verified by the Room of Rooms on the Emulator. So far, I only tried in the emulator.

enter image description here

0
source

All Articles