Reputation: 53
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.
Upvotes: 5
Views: 11178
Reputation: 24
Motodev as suggested by Justin seems to be a good choice for what you're trying to do. Unfortunately it seems to work only with the emulator and not with a real phone.
If you like you can give SQLBride a try. It's a small app I wrote which allows you to connect with almost any database editor (if it knows how to use JDBC drivers) to a running SQLite database on your development phone. It uses a special JDBC driver to connect from your PC to your device. I use it in combination with DBVisualizer and a rooted HTC Desire S and it works almost like if you were connecting to a stand-alone database server.
I consider the app to be in a beta state as I don't have access to too many devices to test it on. If you'd like to give it a try let me know what you think of it and if you encounter any problems. You can get it from the market.
Upvotes: 0
Reputation: 10530
It depends if you are using a Mac or PC. If you are using a Mac, I like SQLManager, and if you are using a PC, use tksqlite. Its a bit annoying, but you can check to make sure things are entered properly. To find the database on the simulator, in the top right corner of Eclipse, select the DDMS view. Look at the file heirachy displayed. Follow the path to your database(which should be data/data/database/YOUR_DATABASE). Select the database, then in the top right, you have an option to "pull from device". Select the destination for the database, then view it with the GUI of your choice.
Upvotes: 0
Reputation: 109257
I don't know whether you liked this way or not, but I am using SQLiteManager for it, Its give nice GUI and also I write query in it. just pull your database .db file from device and check in SQLiteManager.
Thanks.
Upvotes: 1
Reputation: 13801
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.
Upvotes: 4
Reputation: 9908
There are a few options. If your database is stored on the SD card you can mount it via USB and view it with the open source SQLite Database Browser or another desktop tool. What I do usually, though, is use the app called SQLite Manager which is free and has a GUI for android. That way you don't have to repeatedly mount/unmount to examine your database.
Upvotes: 1
Reputation: 6001
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.
Upvotes: 3
Reputation: 30845
This walk through will show you exactly what you need to do to examine the sqlite database for and application from your pc. Unfortunently you'll have to do things from the command line. Sorry, no GUI :(
Upvotes: 1