public class

GooglePlayServicesUtils

extends Object
java.lang.Object
   ↳ com.neomades.platform.GooglePlayServicesUtils

Class Overview

Utility methods for Google Play Services.

Cross Platform Considerations

This class should be used only for the ANDROID platform.

Summary

Public Methods
static boolean isAvailable()
Checks if Google Play Services are available on the device.
static boolean showErrorDialogIfUnavailable()
Checks if Google Play Services are available on the device.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static boolean isAvailable ()

Checks if Google Play Services are available on the device. Services are considered as available only if they are installed, up to date and enabled. Prefer using showErrorDialogIfUnavailable() to check availability and then present solution to the user if the services are not available.

Returns
  • true if Google Play Services are available on the device, false otherwise

public static boolean showErrorDialogIfUnavailable ()

Checks if Google Play Services are available on the device. If they are not, opens a dialog inviting the user to install, update or enable the Google Play Services depending their status.
NB. even if the user asks for an update or an installation with the dialog, the method will return false.

Returns
  • true if Google Play Services is available on the device, false otherwise