Example #1
0
  @Override
  public void stop() {
    if (server != null && server.isAlive()) {
      server.close();
      setConnected(false);

      /*
      if (receiver != null) {
          context.unregisterReceiver(receiver);
          receiver = null;
      }
      */
    } else {
      Log.i(TAG, "Attempting to stop Bluetooth swap, but it is not currently running.");
    }
  }
Example #2
0
 @Override
 public boolean isConnected() {
   return server != null && server.isRunning() && super.isConnected();
 }