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

[Health] Expose additional methods for HealthFactory #799

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marcsanny
Copy link

@marcsanny marcsanny commented Aug 31, 2023

  • Added ability to open native settings for Health and Health connect apps on iOS & Android
  • Added ability to checkAvailability of Health Connect at any time

Currently it was only checked in onAttachedToEngine plugin method (once on initialization). Then after the user downloaded Health Connect, it was impossible to refresh the Health Connect availability status.

Steps to reproduce the current behavior:

  1. Uninstall Health Connect
  2. Call HealthFactory(useHealthConnectIfAvailable: true).requestAuthorization(...); - it will fallback to Google Fit.
  3. Download Health Connect
  4. Call HealthFactory(useHealthConnectIfAvailable: true).requestAuthorization(...); - it will fallback to Google Fit even tho we already have Health Connect.

This PR allows to call checkAvalability() before requesting permission so that we won't fallback to Google Fit when we actually have Health Connect installed

@hoffmatteo hoffmatteo self-assigned this Aug 31, 2023
@marcsanny marcsanny changed the title [Health] Expose checkAvailability method for Android Health Connect [Health] Expose additional methods for HealthFactory Sep 1, 2023
maxbeech added a commit to maxbeech/flutter-plugins that referenced this pull request Oct 15, 2023
* feat: Additional platform specific data types (WIP)

* fix: Refresh health connect client on chackAvailability call

* chore: Bump dependencies

* feat: Add support for Android 14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants