예제 #1
0
 private void deviceConnected() {
   //		Log.v(TAG, "Device connected.");
   if (mConnectionListener != null) {
     mConnectionListener.onDeviceConnected(this);
   }
   this.onDeviceConnected();
 }
예제 #2
0
 private void beforeDeviceClosed() {
   if (this.isConencted()) {
     //			Log.v(TAG, "Run before device disconnected.");
     if (mConnectionListener != null) {
       mConnectionListener.onBeforeDeviceClosed(this);
     }
     this.onBeforeConnectionClosed();
   }
 }
예제 #3
0
  private void deviceConnectionLost() {
    //		Log.v(TAG, "Lost the connection to the device.");
    if (mConnectionListener != null) {
      mConnectionListener.onDeviceConnectionLost(this);
    }

    // Try to reconnect.
    if (this.isBonded() && mReconnectOnConnectionLost) {
      //			Log.v(TAG, "Trying to reconnect to the device.");
      this.connect();
    }
  }