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 |
isFusedLocationDependencyAvailable()
Checks if Google Play services dependency is available for Fused Location.
| ||||||||||
static boolean |
isGoogleAdsDependencyAvailable()
Checks if Google Play services dependency is available for advertising ID tracking.
| ||||||||||
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(Context context)
Checks if the Google Play Store package is installed on the device.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
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, a PlayServicesErrorActivity
will be launched to display any resolution dialog provided by Google Play
services.
context | The application context. |
---|
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 advertising ID tracking.
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 around
isGooglePlayServicesAvailable(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.
context | The application context. |
---|
true
if Google Play Store package is installed on the device,
otherwise false