Introducing Xamarin.Mobile
To simplify the development of these features across multiple platforms, Xamarin has developed a library called Xamarin.Mobile. It delivers a single API for accessing the contacts, GPS location, heading of the screen, camera, and photo library for iOS, Android, and even Windows platforms. It also takes advantage of Task Parallel Libraries (TPL) to deliver a modern C# API that will make developers more productive than their native alternatives would. This gives you the ability to write nice, clean, asynchronous code using the async
and await
keywords in C#. You can also reuse the same code in iOS and Android, apart from a few differences that are required by the Android platform.
To install Xamarin.Mobile, open the Xamarin Component Store in Xamarin Studio and add the Xamarin.Mobile component to a project, as shown in the following screenshot:
Before we dig further into using Xamarin.Mobile, let's review the namespaces and functionality available with the library...