使用蓝牙传感器
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您的应用可以查找可用的蓝牙低功耗 (BLE) 设备,并将传感器数据插入 Google 健身平台。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eThe Android platform offers built-in support for Bluetooth Low Energy (BLE) on devices running Android 4.3 (API level 18) or higher, enabling apps to discover devices, query services, and exchange information.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can integrate data from BLE devices into the Google Fit platform using the \u003ccode\u003einsertData(DataSet)\u003c/code\u003e method, allowing for manual insertion of sensor data collected from local BLE sensors.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Fit data management practices are governed by the Google Fit Developer and User Data Policy to ensure data privacy and security.\u003c/p\u003e\n"]]],[],null,["# Use Bluetooth sensors\n\nYour app can find available Bluetooth Low Energy (BLE) devices and insert sensor\ndata into the Google Fit platform.\n\n- Android 4.3 (API level 18) and higher have [built-in platform support for\n Bluetooth Low Energy (BLE)](https://developer.android.com/guide/topics/connectivity/bluetooth-le)\n for devices in the [central\n role](https://developer.android.com/guide/topics/connectivity/bluetooth-le#roles).\n They provide APIs that apps can use to find devices, query for services, and\n transmit information.\n\n- To get data from a BLE device into the Google Fit platform, use the\n [`insertData(DataSet)`](/android/reference/com/google/android/gms/fitness/HistoryClient#public-taskvoid-insertdata-dataset-dataset)\n method to manually insert data from local sensors.\n\n| **Note:** For requirements that relate to the management of user data, see the [Google Fit Developer and User Data Policy](/fit/policy)."]]