Yesterday, I published my first personal app on Google Play Store. It is a Lego Mini Figures collection app, fully designed by my son. I can describe it as a "patience" app, as all you have to do it wait half an hour each time to enable a new mini figure in your collection. After some time, you'll unblock them all. Well, might not be a thrilling app, but this is how my son envisioned it, and so it went.

If you want to have a look, it is on Play Store at https://play.google.com/store/apps/details?id=com.marcocantu.MyMiniFigures and a screen shot is below:

Form a developer point of view, this app has some interesting features:

  • It dynamically creates a graphical view like the one above by nesting several TGridPanelLayout components, created at runtime and aligned to alTop, inside a TVertScrollBox that covers most of the form. On slower devices it is not very smooth, but OK. On my device it is very fluid.
  • It uses a TPaperSketchEffect to show the place holder for figures that are still unavailable.
  • It stores setting to external files, so they'll be kept as you re-install the app. The folder is obtained using the GetSharedFilesDir function of the Androidapi.IOUtils unit.
  • Status information like the waiting time is stored to an external file, so this is preserved when the app is terminated (and even when it is updated)
  • The various images have been added to the APK, using Delphi's deployment manager (which allows multiple selection not just for adding the file but also for chancing the target folder on Android). Even adding several dozens of files was very easy.
  • The APK size is 8.5M. Not that bad, considering there are about 3M of images embedded in the app.
  • Given the form with the collection loads all images and is build dynamically, it takes a little to start. Differently from iOS, Android lacks the concept of a splash screen, so while the main form loads, you'll get nothing but a black surface. For this reason I added to the app a splash or startup screen. This is the only form that is created at start up. If you create all forms, it will defeat the purpose. Same if you use the splash form OnCreate event handler. You need the form to be fully created and displayed before you create the secondary forms. To keep the code simple, I've done that using a timer, that fires off only once, does the creation, and (when everything is ready) shows two initially hidden buttons to move to the two secondary forms.

In the coming weeks, I'll try creating simple generic demos showing these techniques, like the splash screen and the external files management. For now, you can have a look at the app, which is optimized for phones but works reasonably well also on tablets. More personal apps, all build with my son, are coming along soon. These are quite distinct from demos I write for Embarcadero, as they follow requirements written by a 10 years old. But it is interesting to witness how natural at this age they can envision apps we (adults) won't consider building... like this Lego mini figures collection!

PS. My son is learning English possessive adjectives these holidays (my, your, his, her, its...), hence the "My" in the app name, something we plan building into a series.