code: public void connect() {
          if (isConnected()) {
              Log.w(TAG, "Connect called but isConnected() == true");
              return;
          }
  
          this.startRegistration();
          this.discoverService();
  
          WfdLog.d(TAG, "-----> " + isAutonomous + " , " + goIntent);
          if (this.isAutonomous() && this.goIntent == 15) {
              this.createGroup();
          }
  
          this.connected = true;
      }
docs: Method to connect. Called by {@link it.polimi.spf.wfdadapter.WFDMiddlewareAdapter#connect()}.