蓝牙 HID 设备和iOS 文本字段
我们使用 BT 设备(充当键盘)与 iPad 进行对话。 我们希望这个蓝牙设备能够与我们应用程序中的 1 个字段进行通信。 (这是自己的看法) 我们想要显示虚拟键盘的所有其他文本字段/区域字段。
这可能吗? 每当 BT 设备配对时,它都会禁用屏幕键盘。
我们考虑在显示需要设备输入的 1 字段的视图之前关闭蓝牙,然后在视图移除时重新打开蓝牙,但这有 2 个问题。 iPad 不会自动连接到设备,并且在不使用私有 API 的情况下无法关闭蓝牙。
这是一个相关问题: 连接蓝牙键盘时强制显示屏幕键盘 至今尚未得到满意的答复。
任何帮助将不胜感激
干杯 菲尔
We are using a BT device, which acts as a keyboard, to talk to the iPad.
We want this bluetooth device to talk to 1 field in our app. (Which is on it's own view)
All other textFields/areaFields we want to display the virtual keyboard.
Is this possible?
Whenever the BT device is paired it disabled the on screen keyboard.
We thought of turning bluetooth off before the view with the 1 field that needs its input from the device is displayed and then turning it back on when the view is removed, but this has 2 problems. The iPad will not automatically connect to the device and there is no way to turn bluetooth off without using private API's.
This is a related question:
Force on screen keyboard to show when bluetooth keyboard connected
that has not yet got a satisfactory answer.
Any help will be greatly appreciated
Cheers
Phil
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Erica Sadun 找到了一种通过发送 GraphicsServices 事件来恢复键盘的方法。帖子:http://www. tuaw.com/2010/06/02/hacksugar-bringing-back-the-on-screen-keyboard/ 查看源代码链接。发送 GSEvents 可能尚未为 AppStore 做好准备,但也许值得一试。
Erica Sadun found a way of bringing back the keyboard by sending a GraphicsServices event. Post: http://www.tuaw.com/2010/06/02/hacksugar-bringing-back-the-on-screen-keyboard/ see link to source code. Sending GSEvents might not be AppStore ready, but maybe worth a try.
Phil,
我不确定您是否已经发现了外部附件框架,但这可能是您获得所需内容并拥有一个可以在商店中接受的应用程序的最佳选择。我目前正在解决一些类似的问题,我认为这就是我能够检测用户正在使用哪些我们支持的设备的方法。
https://developer.apple.com/library/ ios/#documentation/ExternalAccessory/Reference/ExternalAccessoryFrameworkReference/_index.html
EAAccessoryManager 看起来可能会给您返回一个附加列表设备。这正是我正在寻找的。它应该允许我采取正确的路径连接到设备。
这可能会给您带来您感兴趣的内容...
希望这会有所帮助。
Phil,
I'm not sure if you've discovered the External Accessory Framework but that is probably your best bet to get what you're after and have an app that will be accepted in the store. I'm currently working through some similar issues and I think this is how I'll be able to detect which of our supported devices the user is using.
https://developer.apple.com/library/ios/#documentation/ExternalAccessory/Reference/ExternalAccessoryFrameworkReference/_index.html
EAAccessoryManager looks like it may give you back a list of attached devices. That's exactly what I'm looking for. It should allow me to then take the correct path to connect to the devices.
This may give you back what you're interested in...
Hope this helps.