Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Filtering Manually Added Data #159

Open
VipulPithva001 opened this issue Sep 23, 2024 · 6 comments
Open

Feature Request: Filtering Manually Added Data #159

VipulPithva001 opened this issue Sep 23, 2024 · 6 comments
Labels
Type: feature request New feature or request

Comments

@VipulPithva001
Copy link

VipulPithva001 commented Sep 23, 2024

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!

@VipulPithva001 VipulPithva001 changed the title 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: 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. 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! Feature Request: Filtering Manually Added Data Sep 23, 2024
@District11Solutions
Copy link

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 matinzd added Type: feature request New feature or request and removed Type: bug labels Sep 23, 2024
@matinzd
Copy link
Owner

matinzd commented Sep 23, 2024

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.

export enum RecordingMethod {
/** Unknown recording method. */
RECORDING_METHOD_UNKNOWN = 0,
/**
* For actively recorded data by the user.
*
* For e.g. An exercise session actively recorded by the user using a phone or a watch
* device.
*/
RECORDING_METHOD_ACTIVELY_RECORDED = 1,
/**
* For passively recorded data by the app.
*
* For e.g. Steps data recorded by a watch or phone without the user starting a session.
*/
RECORDING_METHOD_AUTOMATICALLY_RECORDED = 2,
/**
* For manually entered data by the user.
*
* For e.g. Nutrition or weight data entered by the user.
*/
RECORDING_METHOD_MANUAL_ENTRY = 3,
}

Hope this helps you!

@GSSPawanKumarSingh
Copy link

GSSPawanKumarSingh commented Sep 27, 2024

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.

export enum RecordingMethod {
/** Unknown recording method. */
RECORDING_METHOD_UNKNOWN = 0,
/**
* For actively recorded data by the user.
*
* For e.g. An exercise session actively recorded by the user using a phone or a watch
* device.
*/
RECORDING_METHOD_ACTIVELY_RECORDED = 1,
/**
* For passively recorded data by the app.
*
* For e.g. Steps data recorded by a watch or phone without the user starting a session.
*/
RECORDING_METHOD_AUTOMATICALLY_RECORDED = 2,
/**
* For manually entered data by the user.
*
* For e.g. Nutrition or weight data entered by the user.
*/
RECORDING_METHOD_MANUAL_ENTRY = 3,
}

Hope this helps you!

However there is some issue regarding manual activities. As Health Connect not giving the correct value in metadata recordingMethod key it always giving 0 for unkown activity for all type of activities

User case : I have added some steps manually to Google FIT and some data automatically recorded but when I fetch the records then in metadata for both type of activity recording method is 0.

Please let me know if there is any workaround for that.

Thanks in Advance.

@nikitabalabanovdev
Copy link

nikitabalabanovdev commented Sep 30, 2024

@matinzd @GSSPawanKumarSingh same issue for me, Health Connect always returns 0 for RecordingMethod, even if data were automatically tracked by Google Fit

@GSSPawanKumarSingh
Copy link

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.

export enum RecordingMethod {
/** Unknown recording method. */
RECORDING_METHOD_UNKNOWN = 0,
/**
* For actively recorded data by the user.
*
* For e.g. An exercise session actively recorded by the user using a phone or a watch
* device.
*/
RECORDING_METHOD_ACTIVELY_RECORDED = 1,
/**
* For passively recorded data by the app.
*
* For e.g. Steps data recorded by a watch or phone without the user starting a session.
*/
RECORDING_METHOD_AUTOMATICALLY_RECORDED = 2,
/**
* For manually entered data by the user.
*
* For e.g. Nutrition or weight data entered by the user.
*/
RECORDING_METHOD_MANUAL_ENTRY = 3,
}

Hope this helps you!

However there is some issue regarding manual activities. As Health Connect not giving the correct value in metadata recordingMethod key it always giving 0 for unkown activity for all type of activities

User case : I have added some steps manually to Google FIT and some data automatically recorded but when I fetch the records then in metadata for both type of activity recording method is 0.

Please let me know if there is any workaround for that.

Thanks in Advance.

Is there any update?

@GSSPawanKumarSingh
Copy link

@matinzd @GSSPawanKumarSingh same issue for me, Health Connect always returns 0 for RecordingMethod, even if data were automatically tracked by Google Fit

I have tried with the native side as well. But it still gives 0 for all activities. What I concluded that Google Fit does not writing whether the steps are manual or auto. We have to raise it to google directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants