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 11.0.0] requestAuthorization is not returning value #1046

Open
himalaya-08 opened this issue Sep 19, 2024 · 1 comment
Open

[health 11.0.0] requestAuthorization is not returning value #1046

himalaya-08 opened this issue Sep 19, 2024 · 1 comment
Labels
bugfix a bug fix

Comments

@himalaya-08
Copy link

himalaya-08 commented Sep 19, 2024

Device / Emulator and OS

  • Device: Samsung M14 5G
  • OS: Android 14

Describe the bug

await health.requestAuthorization(types, permissions: permissions) method is not returning value. I have also checked whether we have permission or not using hasPermission method.

To Reproduce

  1. In Android, install the app.
  2. Request for health connect authorization using await healthFactory.requestAuthorization(types, permissions: permissions).
  3. This will not return value.

Expected behavior

await health.requestAuthorization(types, permissions: permissions) should return value either true or false.

Actual behavior

await health.requestAuthorization(types, permissions: permissions) method is not returning value. I have also checked whether we have permission or not using hasPermission method.

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.19.2, on macOS 15.0 24A335 darwin-x64, locale en-IN)
! Warning: dart on your path resolves to /usr/local/Cellar/dart/3.3.1/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
/Users/himalayabaddhan/flutter. Consider adding /Users/himalayabaddhan/flutter/bin to the front of your path.
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Community Edition (version 2023.2.7)
[✓] VS Code (version 1.81.0)
[✓] Connected device (3 available)
! Error: Browsing on the local area network for Bontriage’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same
local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 2 categories.

@himalaya-08 himalaya-08 added the bugfix a bug fix label Sep 19, 2024
@himalaya-08 himalaya-08 changed the title [health 11.0.0] equestAuthorization is not returning value [health 11.0.0] requestAuthorization is not returning value Sep 19, 2024
@ling350181
Copy link

The same problem occurs in iOS 18 Emulator.
await health.requestAuthorization(types, permissions: permissions) method is not returning value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix a bug fix
Projects
None yet
Development

No branches or pull requests

2 participants