Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Android sqlite database from development PC

I am starting with my first few Android apps and I'm using the built-in SQLite database to store my application data. To check if my sql queries create the right tables, constraints, etc. and to check if my application inserts the data I want it to into the tables I always connect with adb to my development phone and use the sqlite3 command.

Eventhough I'm starting to learn Android I've worked the last few years as a professional Java developer doing mainly web and Eclipse RCP development. In these years when I did anything database related I always had access to some kind of visual database editor (depending on RDBMS: Toad, DBVisualizer, Heidi, etc.) and I'm quite accustomed to the comfort these tools offer.

Having a GUI to browse database tables, view constraints, execute test queries, etc. helps me to get my work done a lot faster than for instance when I'm forced to use a command-line shell for these tasks.

So my question: Are there any tools for Android development that allow me to access my apps database during development with a GUI / something more comfortable than sqlite3 from my computer?

P.S.: Of course I found the database tools on the market that allow you to edit your database on the phone. But typing in long sql queries on the phone's keyboard and browsing tables on a 3,7 inch screen is not so comfortable either in my opinion.

like image 549
AndroidStarter Avatar asked Oct 24 '11 17:10

AndroidStarter


2 Answers

MOTODEV seems to have a visual database editor that you can use directly from the IDE. Another option is to pull the sqlite database files from your phone and use any visual sqlite editor. A common one is SQLite Manager which is a plugin for Firefox.

like image 117
Justin Breitfeller Avatar answered Sep 29 '22 20:09

Justin Breitfeller


There a number of Eclipse plug-ins for Android SQLite, just search on the eclipse site. I use motodev (though it requires registration). It's definitely better then command line.

like image 29
slkorolev Avatar answered Sep 29 '22 21:09

slkorolev