Code example for EventBus

Methods: post

0
    else 
    { 
      long difference = currentTime - connectionFailingSince;
      if(difference > MAX_CONNECTION_FAILURE_TIME)
      { 
        eventBus.post(new ConnectionUnsuccessfulEvent(device));
        stop(); 
      } 
    } 
  } 
 
  public BluetoothSocket connect(BluetoothSocket socket)
  { 
    cancelDiscovery(); 
    active.set(true);
    while (active.get())
    { 
      try 
      { 
        socket.connect();
Connect your IDE to all the code out there  Get Codota for Java