Code example for BluetoothDevice

Methods: getBluetoothClassgetUuids

    /** 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 { 
        boolean matches(ParcelUuid[] uuids, BluetoothClass btClass) {
            if (uuids != null) {
                if (BluetoothUuid.containsAnyUuid(uuids, A2dpProfile.SINK_UUIDS)) {
                    return true; 
                if (BluetoothUuid.containsAnyUuid(uuids, HeadsetProfile.UUIDS)) {
                    return true; 
Stop searching for code, let great code find you!  Add Codota to your java IDE