使用Flutter读取来自Wear OS可穿戴设备的传感器数据

huangapple go评论82阅读模式
英文:

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设备。

使用Flutter读取来自Wear OS可穿戴设备的传感器数据

英文:

you can use this plugin https://pub.dev/packages/health

it returns data from google fit, health connect also works for ios devices.

使用Flutter读取来自Wear OS可穿戴设备的传感器数据

答案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

huangapple
  • 本文由 发表于 2023年3月31日 21:18:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/75899009.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定