通过蓝牙发送文件
我正在开发一个应用程序,其功能涉及通过蓝牙发送数据。我已经测试过使用 GameKit 框架发送数据,效果很好。我的问题是“这是正确的方法吗?”或者我应该使用其他方式通过蓝牙传输数据?
另一个问题:当我发送数据时,两台设备(一台发送,一台接收)都必须初始化 GKPeerPickerController 并显示它。有没有一种方法可以让接收者在不调用 GKPeerPickerController 的情况下获得连接通知,以便发送者可以发送文件,而接收者只需确认他想要接收文件(而不寻找发送者又名显示 GKPeerPickerController)?
TX, 马里奥
I'm developing an application that has feature which involves sending data over bluetooth. I've tested sending data with GameKit framework and it works fine. My question is "Is that correct way to go?" or should I use some other way of transporting data over bluetooth?
An additional question: when I'm sending data, both devices (one sending and one receiving) have to init GKPeerPickerController and show it. Is there a way for receiver to get notification for connection without calling GKPeerPickerController, so that sender can send a file and receiver can just confirm he wants to receive file (without looking for sender aka showing GKPeerPickerController)?
Tnx,
Mario
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 GKSession 类和它的委托协议 以编程方式处理点对点连接并实现您自己的视图。
You can use GKSession class and its delegate protocol to handle peer to peer connection programmatically and implement your own views.