Code example for BluetoothClass

Methods: getDeviceClass

0
		final BluetoothDevice btDevice = intent.getExtras().getParcelable(
				BluetoothDevice.EXTRA_DEVICE);
		if(btDevice != null) {
			final BluetoothClass btClass = btDevice.getBluetoothClass(); 
			if (btClass != null) {
				final int btDevClass = btClass.getDeviceClass();
				if ((btDevClass & remoteAudioClass) != 0) {
					SPApp.getInstance().unregisterProximityListener(); 
					SPApp.getInstance().setHeadsetConnected(true); 
					SPApp.log("Bluetooth headset has been connected"); 
				} 
			} 
		} 
	} 
} 
Experience pair programming with AI  Get Codota for Java