code: private void connectionFailed() {
          // Send a failure message back to the Activity
          Message msg = mHandler.obtainMessage(ISOBlueDemo.MESSAGE_TOAST);
          Bundle bundle = new Bundle();
          bundle.putString(ISOBlueDemo.TOAST, "Unable to connect device");
          msg.setData(bundle);
          mHandler.sendMessage(msg);
  
          // Start the service over to restart listening mode
          BluetoothService.this.start();
      }
docs: Indicate that the connection attempt failed and notify the UI Activity.