BIDMCDigitalPsychiatry / LAMP-platform

The LAMP Platform (issues and documentation).
https://docs.lamp.digital/
Other
12 stars 10 forks source link

Android- Updating Google Fit API to HealthConnect API #790

Open sijitg opened 7 months ago

sijitg commented 7 months ago

@carlan1 Google fit API is deprecated . We need to migrate to HealthConnect API https://developers.google.com/fit/android https://developer.android.com/guide/health-and-fitness/health-connect-guidelines/migrate/migration-guide

ZCOEngineer commented 7 months ago

@carlan1 We need to do this soon.

ZCOEngineer commented 6 months ago

@carlan1 will discuss with John and comment on when to do this.

carlan1 commented 6 months ago

Good to proceed.

ZCOEngineer commented 6 months ago

@carlan1 we are starting on this

ZCOEngineer commented 5 months ago

Work is in progress on this.

ZCOEngineer commented 5 months ago

Development is complete, QA in progress.

sijitg commented 5 months ago

@carlan1 QA testing is complete and we need to fill following form to submit build for google review. Could you please fill this.

https://docs.google.com/forms/d/1LFjbq1MOCZySpP5eIVkoyzXTanpcGTYQH26lKcrQUJo/viewform?edit_requested=true

Please see below details of application.

Application package name:

digital.lamp.mindlamp

Following are the health connect data that we collect currently.

READ Permissions for

Heart Rate
Steps
Speed
Calories burned
Basal metabolic rate
Distance
body fat
Hydration
Nutrition
Blood glucode
Blood pressure
Oxygen saturation
Body temperature
Steps cadence
Sleep
Respiratory Rate
sijitg commented 5 months ago

@carlan1 We need to update privacy policy page also. https://www.digitalpsych.org/privacy.html

carlan1 commented 5 months ago

Do we need to update anything in privacy policy other than renaming all instances of google fit API to healthconnect API?

sijitg commented 5 months ago

@carlan1 Instances of Google fit API to be renamed to health connect and the list of data app read from health connect can be provided.

Additionally Google recommend to use following note in the privacy policy page.

The use of information received from Health Connect will adhere to the Health Connect Permissions Policy, including the Limited Use requirements

Google mention one more requirement- Apps reading and/or writing to Health Connect must provide user help documentation that explains how users can manage and delete their data from the app. So can you include this also?

Please see Health connect policy details at following link.

https://support.google.com/googleplay/android-developer/answer/12991134?hl=en

carlan1 commented 4 months ago

Google mention one more requirement- Apps reading and/or writing to Health Connect must provide user help documentation that explains how users can manage and delete their data from the app. So can you include this also?

Is this change implemented in the app yet?

sijitg commented 4 months ago

@carlan1 This is not yet implemented in app. We need to do it.

ZCOEngineer commented 4 months ago

This is now dependent on #801

carlan1 commented 4 months ago

Privacy policy has been updated

sijitg commented 3 months ago

@carlan1 We tried to submit the app to google playstore but there is an error that android.permission.health.READ_HEART_RATE is pending approval. It seems we got approval for other health connect related permissions. Could you check the approval form again or contact Google. Following is the error we get while submitting the app "Error: You need approval to use the following Health Connect permissions in your app: android.permission.health.READ_HEART_RATE. Learn more: https://support.google.com/googleplay/android-developer/answer/12991134 "

carlan1 commented 2 months ago

We have re-submitted form requesting addition of heart rate read permissions.

sijitg commented 2 months ago

We can try to resubmit app on Monday

sijitg commented 2 months ago

@carlen1 It seems heart rate read permission is not yet approved . So we will wait till any update on this permission approval .

carlan1 commented 2 months ago

We have been approved for heart rate read permissions as of yesterday morning, but it may take a few days for the changes to go into effect

sijitg commented 2 months ago

@carlan1 We attempted store submission today . We are still getting this error Error: You need approval to use the following Health Connect permissions in your app: android.permission.health.READ_HEART_RATE. Learn more: https://support.google.com/googleplay/android-developer/answer/12991134 Could you please check.

sijitg commented 1 month ago

@carlan1 As discussed we have removed heart rate permission and completed QA testing here. We shall submit a version tomorrow

sijitg commented 1 month ago

@carlan1 We tried to submit a version for open testing today but it failed due to following error . "Error: You must let us know whether your app uses any Foreground Service permissions." . We are analyzing the issue.

sijitg commented 1 month ago

@carlan1 After investigating the issue further, we understand that Play console should display a new section where we can fill out additional details for Foregrounds services to target Android 14 . Documentation link here However this section is not visible for us . We want to try one more alternative by uploading a build manually (instead of GitHub action which was the method we were trying these days). Submitting the declaration require a link to a video where we demonstrate how we use the permission.

sijitg commented 1 month ago

Hi @carlan1 We have submitted a version manually to get through Google approval process for Foreground services (This is in closed testing mode). Once this is approved we will publish beta version for Open testing .

sijitg commented 3 weeks ago

@carlan1 We got approval for the app submitted last week as closed testing mode. Once the staging environment is ready we need to complete a round of testing here before releasing it for Open testing.

sijitg commented 2 weeks ago

@carlan1 This is live for Open testing .

sijitg commented 2 weeks ago

@kijote0 Health connect API integration including heart rate data collection is ready for Open testing (Staging pointed) Following is the open testing URL of the app. (https://play.google.com/apps/testing/digital.lamp.mindlamp) If you you are opening this link for first time , it will prompt whether to opt-in as a tester. Please Opt-in and proceed. You should get the version 2024.6.5 installed in your device.

Please do not hesitate to contact us should you need any further information. Thank you.

sijitg commented 6 days ago

@carlan1 @kijote0 Once the testing is completed , we suggest to release the production version for public. We have noticed that the live public version ( version 2023.06.02 production) is 5 versions behind staging release in open test track. Please let us know whether we need to create a production release from here. Thank you.

carlan1 commented 5 days ago

I think last we spoke you said you needed to do a manual upload of a beta build, but this was a one-off event. Is it all OK to proceed with using the typical github workflows to create a production build from here? If so we will do that

sijitg commented 5 days ago

We released beta build manually for Google's approval process. After getting approval, we released heart rate enabled build using workflow. This build is now live for Open testing You can create release for LAMP-core-android . The workflow should work and it will release production version for public.