Communicating between iOS and Android with Bluetooth LE

后端 未结 6 610
遥遥无期
遥遥无期 2020-11-28 18:15

I\'ve got a working app using CoreBluetooth to communicate between an iPad (central) and iPhone (peripheral). I have one service that has two characteristics. I have a Nexus

6条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-28 18:50

    I just wanted to share my knowledge on that as I dealt with it some time ago and I quit as there is no support by google. The aforementioned code, what I thank a lot, does not work. You can code in a reasonable time an iOS to iOS or android to android bluetooth le application but the problem comes when you try to communicate between iOS and android. There is a well documented google issue (https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=58725) I collaborated but google didnt pronounce at all and it seems they closed the issue and nothing has changed in android M as Ive been looking into the code and can´t see no further differences. The problem comes when Android tries to connect and specifically in a "if else" sentence; this code basically rejects the transmission and cuts the communication so it doesn´t work. At the moment, there is no solution for that. You can do a WiFi direct solution, but it´s a limitation and there are further problems doing that. The problem doesn´t exist if you want to implement BLE with external hardware (raspberry, sensors, etc.,) but it doesn´t work between iOS and android. The technology is quite the same in both platforms but it´s not well implemented in Android or is purpose inserted pitfall by google to not open the spectre to communicate between both platforms.

提交回复
热议问题