英文:
Reading sensor data from Wear OS wearables using Flutter
问题
如何在iOS/Android手机上的Flutter Android应用中读取Wear OS可穿戴设备(手表)的传感器数据和健康数据?
此外,是否有一种通用API可以访问所有Wear OS手表的传感器/健康数据?还是每个品牌(Google、Samsung等)都有自己的API来访问数据?
英文:
How can the sensor data and health data of a Wear OS wearable device (watch) be read by a Flutter android app on the iOS/android phone?
Additionally, is there a common API to access the sensor/health data for all Wear OS watches? Or does each brand (Google, Samsung, etc) have their own API to access the data?
答案1
得分: 2
你可以使用这个插件 https://pub.dev/packages/health
它可以从Google Fit获取数据,也适用于iOS设备。
英文:
you can use this plugin https://pub.dev/packages/health
it returns data from google fit, health connect also works for ios devices.
答案2
得分: 2
你可以在你的Flutter应用中使用Google Fit API来访问连接的Wear OS手表的传感器数据和健康数据。Google Fit API提供了一组类和方法,用于检索各种类型的数据,例如步数、心率和活动数据,来自连接设备。
关于第二个问题,每个品牌可能有自己的API来访问传感器和健康数据。然而,Google Fit API提供了一个通用接口,用于从各种设备和平台,包括Wear OS设备,访问数据。
英文:
You can use the Google Fit API in your Flutter app to access the sensor data and health data from the connected Wear OS watch. The Google Fit API provides a set of classes and methods to retrieve various types of data, such as step count, heart rate, and activity data, from the connected device.
Regarding the second question, each brand may have its own API to access sensor and health data. However, the Google Fit API provides a common interface to access data from various devices and platforms, including Wear OS devices
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论