Checking android sqlite and IntelliJ

I start with a small application using programmatically created sqlite db. Is there a way to verify that db when the application is running on an emulator?

+7
source share
3 answers

You can download the database file from the device to your computer, and then use any browser / SQLite tool to check the database.

Or using the adb command line tool from the Android SDK tools

 adb pull /data/data/your.app.package.here/databases/yourdatabasefile.db 

or through the device browser (Explorer) in Eclipse in the DDMS version (perhaps this also exists in IntelliJ, Idk)

or the new Android SDK tools provide a neat, stand-alone version of this DDMS perspective and file explorer using the new Device Monitor tool ( android-sdk/tools/monitor.bat )

+7
source
+4
source

The partner found a more dynamic solution using the ADB plugin, you can simply select the database and update the inspector at any time.

firstly, you need to load the plug into the jar https://github.com/tklerx/android-sqlite-browser-for-eclipse (go to releases and select the last one)

then put the jar in [YourAndroidSdkDirectory] / tools / lib / monitor-x86_64 / plugins /

Restart adb

Done! now run the emulator, create your database and browse in ADB to find it on the data / data / ... Select it and click "Create Database" (you cannot see the button before selecting the database file)

Preview

Source: https://groups.google.com/forum/#!msg/adt-dev/Jqw9VslC_Vw/YOXWQa1ozmAJ

0
source

All Articles