Monday, 18 July 2011

Announcing Baitha: The Scala/Android toolkit

Over the past month or so, I have started developing an Android application for a client. Perhaps one of the most interesting aspects of developing this application is that it is being created in Scala and C++. In addition to being a great opportunity to do some larger-scale development for Android and with Scala, it has given me the opportunity to start developing a toolkit for Scala and Android developers.

Baitha is hosted on GitHub and is licensed using the Apache Software License 2.0. I hope it may be useful to other Scala/Android developers, and I would love feedback from developers in terms of comments, patches, etc. The library is currently designed to be used an Android library project and can easily be integrated using a snapshot version of the SBT Android plugin. For more information, please consult the readme.

Right now, the library supports the following features:

  • AlertDialogBuilder: A wrapper around Android’s AlertDialog.Builder class that provides some implicit conversions and a mini-DSL.
  • BuildMode: A trait that makes converting between debug/production code easier.
  • EnhancedViews: Provides some implicit conversions to make adding listeners as functions.
  • Logger: A replacement logging interface inspired by RoboGuice.
  • SdkVersions: Offers conditional execution depending on the runtime version of the Android platform.

Please check it out, use it, and help improve it.