matinzd / react-native-health-connect

React native library for health connect (Android only)
http://matinzd.github.io/react-native-health-connect
MIT License
208 stars 43 forks source link

Feature Request: Filtering Manually Added Data #159

Open VipulPithva001 opened 4 days ago

VipulPithva001 commented 4 days ago

Feature Request: Filtering Manually Added Data

Description: I would like to request a feature that allows for the filtering of manually added data. Specifically, I am looking for the ability to:

  1. Retrieve data that excludes manually added entries. For example, fetching the number of steps without including those that were manually added. In iOS, the react-native-health library provides a flag to handle this.
  2. Fetch all real data and manually added data separately, so we can distinguish between the two types when needed.

Use Case: This feature is particularly useful when distinguishing between actual data collected by devices (like steps counted by a phone or a wearable) and any entries manually added by the user. It allows for more accurate tracking and reporting of physical activity and other health metrics.

Is this something that could be added or integrated into the library? Thank you for considering this request!

District11Solutions commented 4 days ago

Hi,

quick question we are using it for our app in fitness and in ios it is very good as we can flag if users enter manual data but for android there is no way to know. basically it is helpful for us as we are trying to know who really exercise and move and who do not as we are doing challenges and competition. This way we can help our users to be a better version of themselves but on android we have no visibility on this. There is a way to add a flag on android to flag manual data entry ?

Really appreciate your feedback on it.

matinzd commented 4 days ago

As you can see here there is no option to filter out those options from health connect core client. If health connect adds it in the future we can implement it as well. But for now there is no way other than filtering them manually on JS side.

To manually filter in JS side you can use recordingMethod in the metadata object in the response.

https://github.com/matinzd/react-native-health-connect/blob/d7faf11dea310e231aa0dabd5f645dc983d103a9/src/types/metadata.types.ts#L12-L37

Hope this helps you!

GSSPawanKumarSingh commented 20 hours ago

As you can see here there is no option to filter out those options from health connect core client. If health connect adds it in the future we can implement it as well. But for now there is no way other than filtering them manually on JS side.

To manually filter in JS side you can use recordingMethod in the metadata object in the response.

https://github.com/matinzd/react-native-health-connect/blob/d7faf11dea310e231aa0dabd5f645dc983d103a9/src/types/metadata.types.ts#L12-L37

Hope this helps you!

Waiting for the same.