Example usage for android.bluetooth BluetoothDevice equals

List of usage examples for android.bluetooth BluetoothDevice equals

Introduction

In this page you can find the example usage for android.bluetooth BluetoothDevice equals.

Prototype

@Override
    public boolean equals(Object o) 

Source Link

Usage

From source file:com.moto.miletus.application.ble.neardevice.NearDeviceHolder.java

/**
 * broadcastDeviceRoom/*w  ww  .  j a va2  s  .  c  om*/
 *
 * @param device BluetoothDevice
 */
private void broadcastDeviceRoom(final BluetoothDevice device) {
    Intent i = new Intent(Strings.NEAR_DEVICE);

    if (device == null && getNearDevice() == null) {
        return;
    } else if (device != null && getNearDevice() != null && device.equals(getNearDevice())) {
        return;
    }

    context.sendBroadcast(i);

    if (device != null) {
        Log.i(TAG, "Near device: " + device.getAddress());
    } else {
        Log.i(TAG, "No near device.");
    }
}