pgQuilt is my entry to the PostgreSQL Android Application Contest - June/July 2010
I don't have an Android phone, so development was with the emulator. I was excited after watching Google I/O videos and thought I'd like to get into Android development, so this is my first Android application. Hopefully the judges will say "Give that man an Android Phone!" so that I can produce more useful applications.
pgQuilt makes use of tree mapping to show the disk space used by the PostgreSQL schemas and tables, using a different colour for row data, toast, and indexes.
I wanted to create an application for PostgreSQL that makes sense as an Android application. The way I see pgQuilt meeting that need, is that a PostgreSQL DBA can very quickly and easily check on the status of their database. A future version will include the ability to show differences from one check to the next, and display changes over time, even further helping to show a DBA the possible reason why they're having to check on their database while out and about.
The Tree Mapping implementation uses the "Squarified" tiling algorithm, an unoptimised version of which is described in a paper by Mark Bruls, Kees Huizing, and Jarke J. vanWijk.
More screen shots are available.
The version I submitted to the contest judges was v1.1, which wasn't as complete as I'd have liked. In particular it was limited to a single categorisation and a single weighting.
In my submission, I said that I had run out of time, and that I'd have liked the first release to include:
Since submitting it, I've continued working on the code, working on these missing features, and I've finished those first two missing features. (The number of weighting factors is still very limited, but it is now entirely based on SQL results.)
I've also got it caching (while running) the last results and rendered bitmaps, so changing the orientation of your device no longer results in requerying your database... If that doesn't work for you... "you're holding it wrong".
I'm releasing v1.2 with a question for anyone using it: What weightings and categories would you like to see?
I've a friend staying for a week with an HTC Desire, so I can finally see my application running on a real phone! Unfortunately the "Refreshing" progress dialog stayed open on top of the dialog that would let you chose demo mode, or to set up the connection settings!
The slow part of "rendering" (at least on the emulator) is drawing the text over the background, so in v1.3 it shows the background as soon as it is ready, then updates it when the text is overlaid.
I designed the tree mapping code within pgQuilt to be useful to other projects. The implementation is a single View, with the size of all contained areas calculated during the layout call, and a background ASyncTask started to render the background. The foreground is only used to show the selected node.
The license is The PostgreSQL License.
It includes the PostgreSQL JDBC driver, slightly modified to work with Android's JDBC interface.
Version 1.3 of the application is available here: pgQuilt.apk.
The source code of Version 1.2 is available here: pgQuilt.1.2.src.zip.