public class GooglePlayServicesAvailabilityIOException extends UserRecoverableAuthIOExceptionBeta
Wraps a GooglePlayServicesAvailabilityException into an IOException so it can be
caught directly.
Use #getConnectionStatusCode() to display the error dialog. Alternatively, use #getCause() to get the wrapped GooglePlayServicesAvailabilityException. Example usage:
catch (final GooglePlayServicesAvailabilityIOException availabilityException) {
myActivity.runOnUiThread(new Runnable() {
public void run() {
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(
availabilityException.getConnectionStatusCode(),
myActivity, MyActivity.REQUEST_GOOGLE_PLAY_SERVICES);
dialog.show();
}
}Constructors
GooglePlayServicesAvailabilityIOException(GooglePlayServicesAvailabilityException wrapped)
public GooglePlayServicesAvailabilityIOException(GooglePlayServicesAvailabilityException wrapped)| Parameter | |
|---|---|
| Name | Description |
wrapped |
com.google.android.gms.auth.GooglePlayServicesAvailabilityException |
Methods
getCause()
public GooglePlayServicesAvailabilityException getCause()| Returns | |
|---|---|
| Type | Description |
com.google.android.gms.auth.GooglePlayServicesAvailabilityException |
|
getConnectionStatusCode()
public final int getConnectionStatusCode()Returns the error code to use with GooglePlayServicesUtil#getErrorDialog(int, Activity, int).
| Returns | |
|---|---|
| Type | Description |
int |
|