public static boolean matchDevice(final BluetoothGatt gatt){
  final BluetoothGattService service=gatt.getService(UART_SERVICE_UUID);
  return service != null && service.getCharacteristic(UART_TX_CHARACTERISTIC_UUID) != null && service.getCharacteristic(UART_RX_CHARACTERISTIC_UUID) != null;
}

public static boolean matchDevice ( final BluetoothGatt gatt ) { final BluetoothGattService service = gatt . getService ( UART_SERVICE_UUID ) ; return service != null && service . getCharacteristic ( UART_TX_CHARACTERISTIC_UUID ) != null && service . getCharacteristic ( UART_RX_CHARACTERISTIC_UUID ) != null ; }
this method should return true if the profile matches the given device . that means if the device has the required services .
