【发布时间】:2015-12-20 03:09:57
【问题描述】:
我有一个蓝牙 PTT 麦克风 (Delking PTT Bluetooth Mic)
现在我想在 iOS 的小型 PTT 应用中使用它,我的问题是我不知道如何检测 PTT 按钮是按住/释放,我可以看到 Zello 应用运行良好。
大家有什么想法吗?
【问题讨论】:
标签: ios objective-c ios-bluetooth
我有一个蓝牙 PTT 麦克风 (Delking PTT Bluetooth Mic)
现在我想在 iOS 的小型 PTT 应用中使用它,我的问题是我不知道如何检测 PTT 按钮是按住/释放,我可以看到 Zello 应用运行良好。
大家有什么想法吗?
【问题讨论】:
标签: ios objective-c ios-bluetooth
您可以使用耳机远程控制 API 来控制这个蓝牙麦克风
- (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;
}
}
}
【讨论】: