Database versioning, Android style

Question: how can we track database schema upgrades? How can we make sure our database structure matches the deployed code? One answer: in Android’s SQLite database, they solve this problem by storing a version number in   a database property. When an application opens a connection, the version number in the code is checked against … Read moreDatabase versioning, Android style

Android: Confirmation Dialog

Warning! This technique is suited to Android API Level 8-10 (Gingerbread). For Honeycomb or newer, use DialogFragment. Problem: my activity knows how to do something (delete a picture), but it needs to ask the user for confirmation first. Solution: pop a confirmation dialog, whose “yes” button responds by deleting the picture. Code:For the very simplest … Read moreAndroid: Confirmation Dialog

Cross-platform problem solving: how an Android Pro Tip helps our web app design

Separation of concerns is a challenge in a web application. The quick, straightforward way to control a page winds up being messy, with business logic and application logic and view logic all mushed together. Here at my Stealth-Mode Startup, we’re using the Sitebricks web framework on top of Guice. One pain point in our webapps’ … Read moreCross-platform problem solving: how an Android Pro Tip helps our web app design

Setting up an Android project in IntelliJ Idea

And there was pain… I imported an existing Android project into IntelliJ Idea Community Edition 10.5.1. Some things started complaining “Please select Android SDK.” The help pages are out of date; they say to do this in the Android facet settings. It isn’t there. Here is the secret do-things-right button: Module settings (ctrl-alt-shift-S), then pick … Read moreSetting up an Android project in IntelliJ Idea