Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android browse SQLite database on phone

How can I browse the SQLite database that I am creating in my app on my Android myTouch phone?

When I log in through adb shell, sqlite3 gives me a permission denied. Is there another way to check if my database and tables are actually being created, and if rows are being inserted?

I am not able to use the emulator, since it doesn't play videos etc. very well that is the main feature of my app, so I can only test on phone.

like image 976
Chris Avatar asked Jun 07 '10 23:06

Chris


People also ask

Can I use SQLite on Android?

Android SQLite is a very lightweight database which comes with Android OS. Android SQLite combines a clean SQL interface with a very small memory footprint and decent speed. For Android, SQLite is “baked into” the Android runtime, so every Android application can create its own SQLite databases.


2 Answers

The entire database is a single file, so via the DDMS view in Eclipse or via the command line you can pull that file from the phone. You can then use SQLite DataBase Browser to view the contents, for example.

like image 138
JRL Avatar answered Nov 02 '22 21:11

JRL


Using this library you can browse your SQLite database directly from your application https://github.com/sanathp/DatabaseManager_For_Android

Its a single java activity file ,just add the java file to your source folder you can view the tables in your app database , update ,delete, insert rows to you table .Everything from your app.

When the development is done remove the java file from your src folder thats it .

It helped me a lot .Hope it helps you too .

You can view the 1 minute demo here : http://youtu.be/P5vpaGoBlBY

like image 34
sanath_p Avatar answered Nov 02 '22 22:11

sanath_p