Code example for BluetoothSocket

Methods: close

0
      connection.flush();
    } 
     
    if (socket != null) {
      try { 
        socket.close();
      } catch (IOException e) {
        // TODO Auto-generated catch block 
        e.printStackTrace();
      } 
    } 
    sendDisconnectionNotice(); 
  } 
   
  public void setListener(MetaWatchConnection.Listener listener) {
    this.listener = listener;
    if (connection != null) {
      connection.setListener(listener);
    } 
  }