Bug 38014 - GoogleApiAvailability.IsGooglePlayServicesAvailable binding is not available.
Summary: GoogleApiAvailability.IsGooglePlayServicesAvailable binding is not available.
Alias: None
Product: Components
Classification: Xamarin
Component: Xamarin Components ()
Version: Production (addons.xamarin.com)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Mark McLemore
Depends on:
Reported: 2016-01-25 21:48 UTC by Mark McLemore
Modified: 2016-01-29 04:48 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mark McLemore 2016-01-25 21:48:51 UTC
When we use GooglePlayServicesUtil.IsGooglePlayServicesAvailable to check for Google Play Services present in a sample app, we get a build warning:

  Android.Gms.Common.GooglePlayServicesUtil.IsGooglePlayServicesAvailable(Android.Content.Context) is obsolete: 'deprecated'

In fact, a customer has complained about this use of deprecated code:


Looking at Google's API documentation, GoogleApiAvailability.IsGooglePlayServices.Available is to be used instead:

-> https://developers.google.com/android/reference/com/google/android/gms/common/GoogleApiAvailability

However, when we try to use GoogleApiAvailability.IsGooglePlayServices.Available, no binding for this method exists (however, two fields are bound).

=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: edcc0097-b56b-497d-a110-ac5ecc9efb5c
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.Android ===

Version: (Business Edition)
Android SDK: /Users/markmclemore/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 25 rc1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

=== Xamarin Android Player ===

Not Installed

=== Xamarin.Mac ===

Version: (Business Edition)

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: 7322991
Branch: master
Build date: 2015-12-08 16:20:29-0500

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.10.5
Darwin xamac.mclemore.org 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
Comment 1 Mark McLemore 2016-01-25 21:49:51 UTC
Oops, issued this bug from my linux box -- changed the hardware to Mac/Mac OS.
Comment 2 Mark McLemore 2016-01-29 04:47:27 UTC
I've located the missing methods on the Instance method of GoogleApiAvailability; that is, GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable(). I've also built the latest RemoteNotification sample with these changes and it works. Looks like this is not a binding problem after all (it's just hard to locate the methods via Intellisense).