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();
			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"); 
				} 
			} 
		} 
	} 
}