Xamarin

Using Estimotes with Xamarin.Android

Tom Opgenorth

I recently bought some Estimote beacons (a 3rd party iBeacon-like device) - largely because they seem like a cool and nerdy kind of thing. It has an Android SDK which will allow Android devices to interaction with devices. With a little big of effort, I managed to create Xamarin.Android binding and port the sample Android project provided by the Estimote SDK.

You can see an example of the app in these screenshots:

image

Animate a ListView deletion in Xamarin.Android

Tom Opgenorth

A visually pleasant effect when deleting items from a ListView is to animate the row being deleted by gradually change the .Alpha value of the view from 1.0 to 0.0. If you’ve tried to animate the deletion of a row from a ListView in a Xamarin.Android application, you may observe some curious behaviour when rapidly scrolling through a ListView with many rows: the animation may appear on rows other than then one that is being deleted.

Writing GPS information to a JPEG

Tom Opgenorth

One of the handy things about the JPEG format is the ability to store meta-data inside the image using EXIF. There are a few libraries out there for the various programming languages that can help you out with this, and Android actually has something built in to the SDK - the class ExifInterface.

Google’s documentation on writing latitude and longitude to a JPEG are a bit light on details - they loosely hint at the format that latitude or longitude should have. (See the documentation for ExifInterface.TAG_GPS_LATITUDE). The API itself is pretty straight forward, but what Google doesn’t tell you is HOW the GPS coordinates should encoded.

rake your Xamarin.Android Application

Tom Opgenorth

Deploy early, deploy often is a popular goal in Agile methodologies. One easy way to support this to automate your build process. Last year at this time I would just use FinalBuilder to automate the builds of my Xamarin.Android pet projects. It doesn’t take much to set FinalBuilder, and it does provide support for a lot of tasks such as versioning .NET assemblies, manipulating XML, dealing with the file system, and so on.

The problem is that FinalBuilder is Windows only. OS X and Linux types are left out in the cold. As I find myself working almost exclusive in OS X when developing my Xamarin.Android applications, I was looking for a Windows free way to automate my builds.

Enter rake and albacore. rake is, of course the build system for Ruby.