安卓<->iOS 直接通信(蓝牙).是否可以? [英] Android <-> iOS direct communication (Bluetooth). Is it possible?

查看:13
本文介绍了安卓<->iOS 直接通信(蓝牙).是否可以?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我是一名 Android 开发者,所以这个问题是针对所有 iOS 开发者的.

First of all I am an Android developer, so the question goes to all the iOS developers.

是否可以实现 Android <-> iPhone/iPad 直接通信?
有些人声称这是不可能的,其他人则声称它是.

Is it possible to achieve an Android <-> iPhone/iPad direct communication?
Some claim it is not possible, others claim it is.

我想两种可能的技术蓝牙和/或 Wi-Fi Direct.
不推荐 Wi-Fi Direct,因为 Gingerbread 不支持它,据我所知,iPhone 也不支持它(也许是 iPhone 6,我从谣言中听说)

I guess two possible technologies would be Bluetooth and/or Wi-Fi Direct.
Wi-Fi Direct is not recommended because it is not supported by Gingerbread and as far as I know, it is not supported by iPhone either (maybe iPhone 6, as I have heard from rumors)

众所周知,iOS 设备之间使用 GameKit 实现蓝牙通信,这里是 参考.

It is already known that Bluetooth communication is achieved between iOS devices using GameKit and here is a reference.

我不明白在与 GameKit 交流时有什么特别的??
消息是否以某种方式包装,并在消息的开头和结尾添加了额外的字节?很好,我们可以在 Android 中以同样的方式包装消息!
消息是否加密?!!如果是这样,我们可以在 Android 设备收到它们时解密它们吗?

I don't understand what is so special when communicating with GameKit??
Are the messages wrapped in some way with extra bytes at the beginning and ending of the message? Fine, we can wrap the messages the same way in Android!
Are the messages encrypted?!! And if so, could we decrypt them when they are received in an Android device?

欢迎任何想法、变通方法或其他黑客解决方案!

Any ideas, workarounds, or other hackerish solutions are mostly welcome!

推荐答案

iOS 提供了三个框架,您可以使用它们来开发蓝牙应用程序:

There are three frameworks available in iOS using which you can develop the bluetooth applications:

1.GameKit:这是公开可用的框架.但是使用它您只能在两个 iOS 设备之间建立和通信.所以这个框架有其自身的局限性.

1. GameKit: This is the publicly available framework . But using this you can only establish and communicate between only two iOS device. So this framework having its own limitations .

2.BluetoothManager:这是私有框架.我用这个框架来发现非iOS设备.我也建立了连接.但是不能进行数据交换.我认为它仍在开发中.参考这个链接

2. BluetoothManager: This is private framework .I used this framework to discover the non iOS devices . I have established the connection also . But cant able to do the data exchange. I think it is still under development. For the reference you can refer this link

3.CoreBluetooth:这也是公共框架.这只能发现支持 BLE 的设备.我已经成功地使用它在支持 BLE 的设备之间传输数据.

3. CoreBluetooth: This is also the public framework. This can only discover BLE enabled devices . I have successfully used this to transfer the data between the BLE enabled devices.

这篇关于安卓&lt;-&gt;iOS 直接通信(蓝牙).是否可以?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆