Xamarin.Android Binding Generators


This NuGet is no longer required to get nice parameter names in the binding. With the release of Cycle 8, Xamarin has provided a way to use the class-parse tool that comes with the Xamarin release.

More information can be found on the binding docs, but the gist of it is that you just need to add a new element to your project file:


Build status

A MSBuild Task to make Xamarin.Android binding projects easier.

Currently, there is no nice way to set the parameter names for methods when binding Xamarin.Android libraries. This tiny little NuGet adds a .targets file to the Xamarin.Android Binding project.

The .targets file adds a MSBuild task which will then read the jar elements and automatically generate the transform files needed to set the parameter names for all the bound methods.

You can view the project source for this on GitHub.


Using this is very simple, just install the NuGet:

PM> Install-Package Xamarin.Android.Bindings.Generators

Then, rebuild! That is all!

As this is just used for binding projects, it shouldn’t be installed
into Xamarin.Android app projects.


This is currently what is available in the first release:

  • Automatic parsing of InputJar and EmbeddedJar
  • Handles multiple input files
  • Finds available parameter names
  • Missing parameter names are still meaningful (uses type names)
  • Shouldn’t give matched-no-nodes warnings
  • No manual intervention necessary

Xamarin Events in South Africa


I have created a better page for these events. Although the content of this new page is almost identical to this page, It looks way better. Be sure to check it out here and share to with your South African family/friends/colleagues/developers.


Every month, three cities across South Africa have User Groups for anyone interested in Xamarin. These events range from hands-on development to interesting talks related to Xamarin development.

There are user group meetups in 3 major cities:

Cape Town Xamarin User Group

As I stay in Cape Town, I always attend this User Group. We often discuss a wide variety of Xamarin-related topics.

We meet the second-last Thursday every month:

No upcoming events

Gauteng Xamarin User Group

Fairly often, I will come and visit this user group to say hi, and maybe present. Although I am not always there, the presenters / organizers are very good.

These guys meet almost every second Tuesday of the month:

No upcoming events

Durban Xamarin User Group

This user group has just started up, but I know Xamarin developers. We are a great bunch, so come along and see what is happening.

Still to be confirmed, they meet the last Thursday of the month:

No upcoming events

UI Testing for Indie Xamarin Devs

In the Xamarin 4 announcement, there were hundreds of improvements, but some of the most exciting points for indie devs included free access to UITest and Xamarin Insights.

I noticed especially well-received comments during my presentation at the Gauteng Xamarin User Group. Typically South African indie devs complained about high prices, especially due to the exchange rate being very unfavourable.

And this is not just for South Africans; Indie devs don’t usually have large amounts of money to throw at Unit Testing frameworks. They might just grab the best free tool out there. And now, Xamarin has become that “best” and “free” tool.


I think Xamarin.UITest is the best automated UI testing framework currently available. It takes two tried-and-tested frameworks: NUnit and Calabash and merges them to create a excellent C# API for controlling mobile apps.

Not only does UITest make testing easier, we can also test on both devices and simulators at no additional cost. No extra configuration is needed either. When the project is compiled, the test appear in the IDE’s Unit Test panel. From there, the tests can be run as any other unit test.

I installed the NUnit Test Adapter for Visual Studio as this IDE can’t run NUnit tests natively.

Simple Example

Using UITest is very easy, and just requires that the interaction is described using C# code. The actual flow of the code is the same as if you had actually performed the actions on the device.

Lets take an example test case – making sure a credit card number is valid. We would first want to make sure that the text field is clear before entering the number. Then, after the keyboard is hidden, we want to start the validation. Finally, we need to ensure that the error message appears.

In this test, failure comes if the error message does not appear at all, or if the screen changes.

// clear credit card number

// enter a card number
app.EnterText("CreditCardNumber", "123456789123456");

// make sure the keyboard is gone

// tap the validate button
app.Tap (c => c.Button ("ValidateCreditCard"));

// make sure that the error message appears
app.WaitForElement(c => c.Marked("Credit card number is invalid."));

Xamarin Test Recorder

Xamarin recently announced the Xamarin Test Recorder, a preview tool that makes writing mobile UI tests even easier.

Instead of writing this test by hand from scratch, we can make use of the recorder to interact with the app. While we do this, the recorder writes out the steps in C# code. We can then take this code and add it to our test project.

Although the recorder is not perfect yet, we can still use the code and just tweak it a bit. I found that sometimes the recorder wasn’t able to pick up when I had tapped on switches or sliders, but this can be changed. If the element has an ID, then we can swap out the code that tries to find the element by UI index with code that finds the element by ID.

Xamarin 4 – in Bullet Form

With the announcement of Xamarin 4, there were hundreds of changes, new features and improvement. Xamarin included major and minor changes to all phases of the lifecycle of a mobile app.

Mobile Life Cycle

I thought I would re-share some of the features, just in case you missed some 🙂 But, during my presentation at the Gauteng Xamarin User Group, I saw some areas that were especially interesting to South Africa developers.

New in the Xamarin Platform

The most well known area of Xamarin is the BUILD platform. This received some love:

  • Xamarin.Forms 2.0
    Faster, more reliable, and more functional. Pre-compiled XAML. Support for UWP, iOS 9 and Android Material Design. New gestures.
  • Visual Studio and iOS
    Rebuilt the Visual Studio extension from the ground up. Multiple concurrent Visual Studio instances.
  • Mono/.NET Upgrade
    Incorporated large portions from Microsoft’s open sourced .NET codebase.
  • Android and iOS Designers
    iOS designer can load XIB files. Android designer supports Android Material Design. Improved UI and UX for both designers.
  • Objective Sharpie & CocoaPods
    Improved parsing of header files. New attributes for Objective-C equivalents. Support for generating bindings from a CocoaPod.

New in Xamarin Test Cloud

More recently added to Xamarin is the advanced testing capabilities using new testing tools:

  • Xamarin Test Recorder
    New preview tool that makes mobile UI testing dead simple. Initially available for Mac
  • Xamarin.UITest 1.0
    New capabilities for advanced test scenarios. Free for everyone to use. No limits on test duration. No limits on the use of local devices and simulators.

Xamarin Insights

Now generally available, you can track your apps in the wild:

  • General Availability
    Free crash reporting for all Xamarin Platform customers. 30 days data retention.

Something for Everyone

Along with new features and improvements, Xamarin has given developers even more free stuff with each subscription:

  • Xamarin Insights with 30 day data retention.
  • 60 Xamarin Test Cloud device minutes per month.
  • Complete access to Xamarin.UITest.
  • A 30-day trial pass to Xamarin University.

Read the official announcement by Xamarin.