Các API của Google Fit, bao gồm cả API Google Fit REST, sẽ ngừng hoạt động vào năm 2026. Kể từ ngày 1 tháng 5 năm 2024, nhà phát triển không thể đăng ký sử dụng các API này.
Để đưa dữ liệu từ thiết bị BLE vào nền tảng Google Fit, hãy sử dụng phương thức insertData(DataSet) để chèn dữ liệu từ các cảm biến cục bộ theo cách thủ công.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\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)."]]