December 13th, 2013

Improvements to the Google Play Services Component

We made some changes to the Google Play Services component that will make it even easier to utilize Google Play Services in your Xamarin.Android application.

Automatically Downloads Google Play Services Client Library

The first improvement is that the component is no longer dependent on the Google Play Services client library installed on your workstation. The Google Play Services component embeds metadata to identify what version of the Google Services client library it is bound to. When you add the component to your application, the correct version of the Google Play Services client library is downloaded and the component automatically binds to that, instead of the version that is installed by the Android SDK Manager.

Three Different Versions

Now that the Google Play Services component can manage the version of the Google Play Services client library it needs, the only thing you need to concentrate on is the minimum version of Android your application will support. Just pick one of these three components:

  • Google Play Services – This component is meant for projects that target Android 4.0 (API level 14) or higher.

  • Google Play Services (Froyo) – This component is for projects that target Android 2.2 (API Level 8). In November, 2013 Google stopped supporting Android 2.2 in the newer versions of Google Play Services. You can still use the existing Google Services in your Android 2.2 app, but you won’t get any of the latest bug fixes or features.

  • Google Play Services (Gingerbread) – This component is for projects that target Android 2.3 (API level 10).

Screenshot 2013-12-09 14.58.24

Automatically References Dependencies

The previous versions of the component required you to manage dependencies, specifically the Android Support Package. The latest update takes care of this for you, by including the relevant dependencies:

If you’re already using the component in an existing project and have a reference to Mono.Android.Support.v4 or Mono.Android.Support.v7, you’ll have to remove these old references when you upgrade to the latest version of the component.

If you’re new to the Google Play Services component, why don’t you get the Maps And Location Demo v3 sample from GitHub and try things out for yourself?

Discuss this blog post in the Xamarin Forums

Author

Tom is a long-life learner with a long time interest in technology, but has been very focused on Android for the past few years. Originally trained as a software developer, his career has involved many of the sub-disciplines that make up computer programming. He started with Android back in 2009 with the Google ADP1, and joined Xamarin docs team in late 2011. While at Xamarin, he diligently worked on the Xamarin.Android and Xamarin Test Cloud docs. Tom currently lives near Edmonton, Alberta ...

More about author