[英]Can two apps read data from the same BLE sensor in Android?
Can two independent apps (on the same phone) read the data from the same BLE sensor? (在同一部手机上)两个独立的应用程序可以从同一BLE传感器读取数据吗?
Case in point: Can I develop an app that gets the HR from a BT HR sensor while another app is already connected to it? 例如:我是否可以开发一个已经从BT HR传感器获取心率的应用程序,而另一个应用程序已经连接到它?
No you can only have one active connection at the same time. 不可以,您一次只能建立一个活动连接。 For two handsets to read from one heart rate monitor you would have to connect one, do a read, disconnect, connect the other, do a read. 要使两部手机从一个心率监测仪读取数据,您必须连接一个,进行读取,断开连接,连接另一个,进行读取。
A possible workaround is if you include the heartrate in the advertisement packet. 可能的解决方法是,如果在广告数据包中包含心率。 This way you don't even have to be connected at all. 这样,您甚至都不需要连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.