Introducing the Xamarin Mobile API Preview

Things have been a little quiet from me lately, both on blog series I started and projects I started. The reason is that I have been very busy starting an exciting new position with Xamarin. Today I’m happy to give a preview of my first project with Xamarin.

With MonoTouch and Mono for Android, you can already share a huge portion of your code across iOS, Android and Windows Phone. There is, however, this middle ground of APIs that are present in all three platforms, but you can’t share your code that utilizes them. You currently have to write separate sets of code to use geolocation, the accelerometer, contacts, etc on these various platforms and we want to fix that. The Xamarin Mobile API preview contains a new set of APIs designed and implemented to support these features evenly across iOS, Android and Windows Phone.

We want your feedback to help guide us in this endeavor, so today we’re releasing a preview. The preview contains a unified geolocation API with implementations on iOS and Android. We’ll be releasing a Windows Phone implementation at some point in the future. Try it out and give us your feedback, we want to know what you think! Let us know of any pain points in the API, if something doesn’t work, etc. We also want to know what other areas you care most about us unifying next, whether it be contacts, notifications, etc.

As this is a preview, please keep in mind that APIs may change, things may be broken and not all of the docs are filled out. For Android, currently a minimum API level of 7 is required. Additionally on Android, heading is disabled and Geolocator’s constructor takes an argument of Context.

You can download the preview here and let us know what you think or want to see here. If you run into a bug, please file it here.

Update 12/5: The package has been updated to work with Mono for Android 4.0 (and now requires it).