Closed 1ns4n33 closed 9 months ago
also having this issue. Exception trace below.
E/MethodChannel#flutter_health(18416): Failed to handle method call
E/MethodChannel#flutter_health(18416): java.lang.NullPointerException
E/MethodChannel#flutter_health(18416): at cachet.plugins.health.HealthPlugin.requestAuthorizationHC(HealthPlugin.kt:1648)
E/MethodChannel#flutter_health(18416): at cachet.plugins.health.HealthPlugin.requestAuthorization(HealthPlugin.kt:1374)
E/MethodChannel#flutter_health(18416): at cachet.plugins.health.HealthPlugin.onMethodCall(HealthPlugin.kt:1537)
E/MethodChannel#flutter_health(18416): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#flutter_health(18416): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#flutter_health(18416): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/MethodChannel#flutter_health(18416): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#flutter_health(18416): at android.os.Handler.handleCallback(Handler.java:958)
E/MethodChannel#flutter_health(18416): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#flutter_health(18416): at android.os.Looper.loopOnce(Looper.java:230)
E/MethodChannel#flutter_health(18416): at android.os.Looper.loop(Looper.java:319)
E/MethodChannel#flutter_health(18416): at android.app.ActivityThread.main(ActivityThread.java:8893)
E/MethodChannel#flutter_health(18416): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_health(18416): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
E/MethodChannel#flutter_health(18416): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
E/flutter (18416): at cachet.plugins.health.HealthPlugin.requestAuthorizationHC(HealthPlugin.kt:1648)
E/flutter (18416): at cachet.plugins.health.HealthPlugin.requestAuthorization(HealthPlugin.kt:1374)
E/flutter (18416): at cachet.plugins.health.HealthPlugin.onMethodCall(HealthPlugin.kt:1537)
E/flutter (18416): #2 HealthFactory.requestAuthorization (package:health/src/health_factory.dart:150:32)
E/flutter (18416): #3 HealthProvider.initHealthProvider (package:dharmadr/services/health.dart:24:9)
I was having the same issue on Android 14, change from version 8.1.0 to 9.0.0 of the plugin and solve this issue (but a new one come up) :(
I was having the same issue on Android 14, change from version 8.1.0 to 9.0.0 of the plugin and solve this issue (but a new one come up) :(
Thank you for the reply, so we have to wait 🥲
I was finally able to upgrade to 9.0.0. This resolved the issue for my.
Device / Emulator and OS
Device: Pixel 7 Pro OS: Android SDK 33
Device: Pixel 7 Pro OS: Android SDK 34
Describe the bug
I'm getting errors when I try to request Health Connect permissions (I have already request to Google the permissions for HealthConnect for my App and got accepted).
WIth SDK 33: I have attached a screen to show where it crash, when I select the account it give me this error:
While with SDK 34 I got another error, with this one it doesn't open any intent:
To Reproduce
Install Health Connect (Beta), initialise it and then try to request some HealthDataType with Android 33 or 34
Screenshots
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.16.9, on macOS 14.2 23C64 darwin-arm64, locale en-IT) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.85.2) [✓] Connected device (4 available) ! Error: Browsing on the local area network for 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
• No issues found!
Additional information
I have found another issue, for IOS the number of flights climber it's called 'FLIGHTS_CLIMBED' but for Android it's 'FLOORS_CLIMBED', the last one doesn't exists and if you try to request 'FLIGHTS_CLIMBER' it will crash.
This is how I request the permissions:
This is my actual Manifest: