Phillip Trelford's Array

POKE 36879,255

F# on Android

Android games are now out-selling games for Sony and Nintendo handhelds. Thanks to the nice people at Xamarin you can now develop Android and iOS apps using all your favourite .Net languages:

Xamarin.Android 4.8.0 - New Features - F# support

Now it has been possible to target F# on Android and iOS for some time. In the latest release FSharp.Core is included and a blessed dll for the 64kb limit on trial versions.


You can use Xamarin.Android inside Visual Studio 2012 on Windows, which is how I got started. But I’d recommend giving Xamarin Studio a go, it has all the features you’d expect like intellisense and debugging.


In my opinion Xamarin Studio on Mac really whips the llamas ass!

On OS X you get a full suite of project options for Android:

full suite of F# projects in Xamarin Studio on Mac

And ASP.Net if that’s your thing:

ASP.Net from Xamarin Studio on Mac

There’s plenty of project options but there’s little in the way of WYSIWYG designers right now. That said F# is targeted more at code-orientated developers and I’ve rarely seen a developer use a designer for XAML, everyone seems to end up editing the XML directly.


Once you’re up and running, which doesn’t take long, you can run your code at one of the supplied Android emulators or connect your device:

Xamarin Android emulator running on Mac

And of course you can debug live code running in the Android emulator:

Debug FSharp Code running on Android in Xamarin Studio on Mac

Nexus 7

Here’s my “hello world” bubbles app running on my Nexus 7:

Bubbles on Nexus 7


Neil Danson gave a great introduction to F# on iOS at Skills Matter recently:

Including a mini-game imaginatively titled Pissed Off Owls.

The experience for iOS and Android are pretty similar.

Neil also has a set of tutorials on F# and MonoGame:

If you’re interested in meeting the man behind Xamarin why not pop over to the Progressive F# Tutorials in New York on September 18th and 19th:


Comments are closed