java.lang.Object | |
↳ | com.urbanairship.google.PlayServicesUtils |
A utility class to help verify and resolve Google Play services issues.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | MISSING_PLAY_SERVICE_DEPENDENCY | Error code returned by isGooglePlayServicesDependencyAvailable()
when the Google Play services dependency is missing. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PlayServicesUtils() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static void |
handleAnyPlayServicesError(Context context)
Checks and handles any user recoverable Google Play services errors.
| ||||||||||
static boolean |
isFusedLocationDepdendencyAvailable()
This method is deprecated.
Marked to be removed in 7.0.0. Use
isFusedLocationDependencyAvailable() instead.
| ||||||||||
static boolean |
isFusedLocationDependencyAvailable()
Checks if Google Play services dependency is available for Fused Location.
| ||||||||||
static boolean |
isGoogleCloudMessagingDependencyAvailable()
Checks if Google Play services dependency is available for GCM.
| ||||||||||
static int |
isGooglePlayServicesAvailable(Context context)
Verifies that Google Play services dependency is available and the Google
Play services version required for the application is installed and enabled
on the device.
| ||||||||||
static boolean |
isGooglePlayServicesDependencyAvailable()
Checks if Google Play services dependency is available.
| ||||||||||
static boolean |
isGooglePlayStoreAvailable()
Checks if the Google Play Store package is installed on the device.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Error code returned by isGooglePlayServicesDependencyAvailable()
when the Google Play services dependency is missing.
Checks and handles any user recoverable Google Play services errors.
If a user recoverable error is encountered, aPlayServicesErrorActivity
will be launched to display any resolution dialog provided by Google Play
services.context | The application context. |
---|
This method is deprecated.
Marked to be removed in 7.0.0. Use isFusedLocationDependencyAvailable()
instead.
Checks if Google Play services dependency is available for Fused Location.
true
if available, otherwise false
.Checks if Google Play services dependency is available for Fused Location.
true
if available, otherwise false
.
Checks if Google Play services dependency is available for GCM.
true
if available, otherwise false
.
Verifies that Google Play services dependency is available and the Google Play services version required for the application is installed and enabled on the device.
This method is a wrapper aroundisGooglePlayServicesAvailable(android.content.Context)
but with an additional check if the dependency is also available.context | The application context. |
---|
MISSING_PLAY_SERVICE_DEPENDENCY
if Google Play services dependency is missing,
or the errorCode returned by
isGooglePlayServicesAvailable(android.content.Context)
Checks if Google Play services dependency is available.
true
if available, otherwise false
.
Checks if the Google Play Store package is installed on the device.
true
if Google Play Store package is installed on the device,
otherwise false