I'm trying to know how is possible to observe events from Bluetooth handsfree(Particular case - Plantronics M50) devices?
WatsApp does it, through the BTServer.
I've tried to catch event with:
- MPRemoteCommandCenter
MPRemoteCommandCenter* remoteCommandCenter = [MPRemoteCommandCenter sharedCommandCenter]; [[remoteCommandCenter togglePlayPauseCommand] addTarget:_sharedService action:@selector(didPressPlayPauseCommand)];
The approach works for headset, but not for Bluetooth handsfree.
- UIApplication -beginReceivingRemoteControlEvents
The same behaviour, as with MPRemoteCommandCenter. Doesn't work with bluetooth devices, but works with headset.
So, have anyone ideas, how to do the same job as it does WhatsApp?
Feel free to suggest anything on Swift. Any ideas? :)