I have a Bluetooth PTT mic (Delking PTT Bluetooth Mic)
Now I want to use it in my small PTT app in iOS, and my problem is I don't know how to detect the PTT button is hold/release, I could see Zello app works great.
Can you all have any ideas?
You can use Headset remote control API to control this bluetooth microphone
- (void) remoteControlReceivedWithEvent: (UIEvent *) receivedEvent {
if (receivedEvent.type == UIEventTypeRemoteControl) {
switch(receivedEvent.subtype) {
case UIEventSubtypeRemoteControlTogglePlayPause:
//Insert code
case UIEventSubtypeRemoteControlPlay:
//Insert code for HOLDING BUTTON
break;
case UIEventSubtypeRemoteControlPause:
// Insert code for RELEASE BUTTON
break;
case UIEventSubtypeRemoteControlStop:
//Insert code.
break;
default:
return;
}
}
}