简体   繁体   English

两个应用程序可以从Android中的同一个BLE传感器读取数据吗?

[英]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.

相关问题 无法使用Android 7从Nexus 5x读取BLE传感器的服务 - Not able to read Services of BLE sensor from Nexus 5x with android 7 从多个应用程序到同一BLE设备的Android BLE同时连接 - Android BLE simultaneous connections from several apps to the same BLE device 在Android应用程序中连续读取ble中的数据 - Read data from ble in android app continuously Android-BLE连接参数和将BLE传感器数据存储在SQLite数据库中 - Android - BLE connection parameter and Storing BLE sensor data in SQLite Database 我可以在 android 中同时在两个应用程序中使用陀螺仪传感器吗? - Can I use gyroscope sensor in two application at same time in android? 在Android中快速读取传感器数据 - Read sensor data fast in Android 是否可以从 Android 上的 TOF(飞行时间)传感器读取数据? - Is it possible to read data from TOF (time-of-flight) sensor on Android? 如何在Android中不配对的情况下从蓝牙BLE设备读取数据 - How to read data from a Bluethooth BLE device without pair in Android 如何从BLE设备连续向Android应用读取数据? - How to read data from a BLE device continuously to android app? 如何从 Android 中的 BLE 设备读取数据? - How does one read data from a BLE device in Android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM