Brian FTG
Brian FTG

Reputation: 23

Browsing Android SQLite database within application

Does anyone know of Android code I could embed directly in my app, such that I could browse my SQLite database directly from within my app?

If not, how about code that reads the SQLite metadata, and dumps table and column names and data to the log? (In JDBC, I'd use databasemetadata to get table info, and then table metadata to get column info...)

I know I can browse on an emulator, and I can copy the db off the device and then point a db browser at it. But this would be a lot more convenient for me during development. This would of course be used only for test databases with tiny amounts of data. Any suggestions?

Upvotes: 2

Views: 338

Answers (2)

sanath_p
sanath_p

Reputation: 2218

I think this is what you are looking for .

Using the library in the link below you can browse your app database from your app https://github.com/sanathp/DatabaseManager_For_Android

With this library you can manage your app SQLite database from you app itself. you can view the tables in your app database , update ,delete, insert rows to your tables .Everything from your app.

Its a single java activity file ,just add the java file to your source folder.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

Upvotes: 0

Aleks G
Aleks G

Reputation: 57316

Have a look at this question: browse data in Android SQLite Database It may not be exactly what you're asking, but may be sufficient for your needs.

Alternatively, there's a sqlite database browser app in the market, which you may be interested in (I haven't tested it myself): https://market.android.com/details?id=com.xuecs.sqlitemanager&hl=en

Upvotes: 1

Related Questions