lock-google/src/main/java/com/auth0/android/google/GoogleAPI.java
Dialog getErrorDialog(int errorCode, int requestCode) {
        final Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(activity, errorCode, requestCode);
        dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
            @Override
            public void onDismiss(DialogInterface dialogInterface) {
                resolvingError = false;
            }
        });
        return dialog;
    }
Dialog getErrorDialog(int errorCode, int requestCode) {
        final Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(activity, errorCode, requestCode);
        dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
            @Override
            public void onDismiss(DialogInterface dialogInterface) {
                resolvingError = false;
            }
        });
        return dialog;
    }
Helper to create a new dialog from an error code.

@param errorCode   the code int to explain
@param requestCode the request code to use when you expect the result.
@return a new dialog instance ready to show