Exception GooglePlayServicesAvailabilityIOException (2.1.0)

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)
Parameter
NameDescription
wrappedcom.google.android.gms.auth.GooglePlayServicesAvailabilityException

Methods

getCause()

public GooglePlayServicesAvailabilityException getCause()
Returns
TypeDescription
com.google.android.gms.auth.GooglePlayServicesAvailabilityException
Overrides

getConnectionStatusCode()

public final int getConnectionStatusCode()

Returns the error code to use with GooglePlayServicesUtil#getErrorDialog(int, Activity, int).

Returns
TypeDescription
int