Code example for BluetoothDevice

Methods: getBluetoothClass

0
			return; 
		} 
		final BluetoothDevice btDevice = intent.getExtras().getParcelable(
				BluetoothDevice.EXTRA_DEVICE);
		if(btDevice == null) {
			final BluetoothClass btClass = btDevice.getBluetoothClass();
		final int btDevClass = btDevice.getBluetoothClass().getDeviceClass();
		if ((btDevClass & remoteAudioClass) != 0) {
			SPApp.getInstance().registerProximityListener(); 
			SPApp.getInstance().setHeadsetConnected(false); 
			SPApp.log("Bluetooth headset has been disconnected"); 
			} 
		} 
	} 
}