code: public void startSetup(@Nullable final OnIabSetupFinishedListener listener) {
          // If already set up, can't do it again.
          if (mSetupDone) throw new IllegalStateException("IAB helper is already set up.");
  
          // Connection to IAB service
          Logger.d("Starting in-app billing setup.");
          mServiceConn = new ServiceConnection() {
              @Override
              public void onServiceDisconnected(ComponentName name) {
                  Logger.d("Billing service disconnected.");
                  mService = null;
              }
  
              @Override
              public void onServiceConnected(ComponentName name, IBinder service) {
                  Logger.d("Billing service connected.");
                  mService = getServiceFromBinder(service);
                  componentName = name;
                  String packageName = mContext.getPackageName();
  
                  final Handler handler = new Handler();
                  flagStartAsync("startSetup");
                  startSetupIabAsync(packageName, new OnIabSetupFinishedListener() {
                      @Override public void onIabSetupFinished(final IabResult result) {
                          handler.post(new Runnable() {
                              @Override public void run() {
                                  flagEndAsync();
                                  listener.onIabSetupFinished(result);
                              }
                          });
                      }
                  });
              }
          };
  
          Intent serviceIntent = getServiceIntent();
          final List<ResolveInfo> infoList = mContext.getPackageManager().queryIntentServices(serviceIntent, 0);
          if (infoList != null && !infoList.isEmpty()) {
              // service available to handle that Intent
              mContext.bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE);
          } else {
              // no service available to handle that Intent
              if (listener != null) {
                  listener.onIabSetupFinished(new IabResult(BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE,
                          "Billing service unavailable on device."));
                  Logger.d("Billing service unavailable on device.");
              }
          }
      }
docs: Starts the setup process. This will start up the setup process asynchronously.
  You will be notified through the listener when the setup process is complete.
  This method is safe to call from a UI thread.
  
  @param listener The listener to notify when the setup process is complete.