简体   繁体   English

从多个应用程序到同一BLE设备的Android BLE同时连接

[英]Android BLE simultaneous connections from several apps to the same BLE device

I'm a new at BLE. 我是BLE的新手。 So, I'm confused with situation where it's supposed to have Android phone where several apps work in background and use BLE for scanning of others BLE devices. 因此,我对本应配备Android手机且多个应用程序在后台运行并使用BLE扫描其他BLE设备的情况感到困惑。 Is it possible to establish simultaneous connections from my apps to the same BLE (peripheral) device? 是否可以建立从我的应用程序到同一BLE(外围设备)的同时连接? If is not possible how will such case be resolved? 如果不可能的话如何解决? What app will get access to BLE device the first? 哪个应用程序将首先访问BLE设备?

No it is not possible. 不,这是不可能的。 A Bluetooth LE device can only make one connection at a time. 蓝牙LE设备一次只能建立一个连接。

If you need a connection shared between you apps, you can create a service to handle that connection and send data to and from your apps using a broadcast. 如果需要在应用程序之间共享连接,则可以创建服务以处理该连接,并使用广播向应用程序发送数据以及从应用程序发送数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM