public class GooglePlayServicesAvailabilityIOException extends UserRecoverableAuthIOException
Beta
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)
Name | Description |
wrapped | com.google.android.gms.auth.GooglePlayServicesAvailabilityException |
Methods
getCause()
public GooglePlayServicesAvailabilityException getCause()
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).
Type | Description |
int |