Code example for BluetoothDevice

Methods: getBondState

0
    } 
 
    /** Filter that matches only unbonded devices. */ 
    private static final class UnbondedDeviceFilter implements Filter { 
        public boolean matches(BluetoothDevice device) {
            return device.getBondState() != BluetoothDevice.BOND_BONDED;
        } 
    } 
 
    /** Parent class of filters based on UUID and/or Bluetooth class. */ 
    private abstract static class ClassUuidFilter implements Filter { 
        abstract boolean matches(ParcelUuid[] uuids, BluetoothClass btClass);
 
        public boolean matches(BluetoothDevice device) {
            return matches(device.getUuids(), device.getBluetoothClass());
        } 
    } 
 
    /** Filter that matches devices that support AUDIO profiles. */ 
    private static final class AudioFilter extends ClassUuidFilter { 
        @Override