flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

[health 4.0.0] Add device_model or more structured device infos to the HealthDataPoint result

Open fix92 opened this issue 2 years ago • 0 comments

Description

Currently there's a source_name available which represent's something like "Tom's iPhone" or "Anna's Apple Watch" or the app package name or the device of which the healthdatapoint originates. I don't know for which reason this was added. My best guess is to help distinguish which point comes from a phone and which from a watch etc. Though for e.g. iOS this current value is pretty much customizable to the user as it's the user-chosen device name. Maybe since the content of this field is arbitrary anyway, we can either add one more e.g. device_model that chains its content with more information:

So specifically for ios HKDevice the manufacturer, model, software and softwareVersion: https://developer.apple.com/documentation/healthkit/hkdevice

And for Android there's the Device which provides similar infos: manufacturer, model, type: https://developers.google.com/android/reference/com/google/android/gms/fitness/data/Device

Possibly all those can also be chained together in a string that either extends or replaces the current source_name similar to a web user agent only containing data not editable by the user.

fix92 avatar Jun 08 '22 10:06 fix92