venerdì 25 maggio 2012

Browse your Android SQLLite database from Eclipse

I think this is very useful tool for any Android developers. Sometimes you need to check what you store in your application database or SharedPreferences. Ok, you can always write a good test for it, but in some case you just need a quick check to verify the integrity of your stored data or the structure of your tables.

Since a lot of Android developers uses Eclipse to implement their application, it would be great to have a tool inside our IDE to explore our application Database.

SQLite & XML Browser is the tool that allow that. You can download it clicking here

After that you have downloaded the plugin you can:
  • Put the file in your Eclipse plugins folder (e.g. /usr/lib/eclipse/plugins)
  • Restart Eclipse
  • Start up an Android Emulator w/ Debugging in Eclipse
  • Switch to the DDMS Perspective in Eclipse
  • Go to the 'File Explorer' tab to locate your device's database file
  • Navigate to: e.g. 'data -> data -> com.myapplicationpackage -> databases -> myapplication
  • Click on the little Database icon at right top
  • Switch to the 'Questoid SQLite Browser' tab that appears
  • Switch to the 'Browse Data' sub tab
  • Select your table from the drop down menu
  • Browse data
 Here you are a video that show how it works: