code: 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;
      }
docs: 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