You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Google Health Connect is not installed on the device the plugin gives the following exception when calling any method (including the HealthConnectFactory.isApiSupported() method. I verified this same behaviour happens in the provided example app.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(NO_ACTIVITY, No activity available, null, null)
This is because there is no activityContext available while this is asserted on line 71 in FlutterHealthConnectPlugin.kt.
I believe the correct behaviour would be to not require the activityContext for the following method calls: isApiSupported, isAvailable, and installHealthConnect.
The text was updated successfully, but these errors were encountered:
I have this hacky workaround which is far from perfect. However, this library seems not able to work in production atm (see the other ticket on that) so that's the next show stopper you'll run into.
When Google Health Connect is not installed on the device the plugin gives the following exception when calling any method (including the
HealthConnectFactory.isApiSupported()
method. I verified this same behaviour happens in the provided example app.This is because there is no activityContext available while this is asserted on line 71 in
FlutterHealthConnectPlugin.kt
.I believe the correct behaviour would be to not require the activityContext for the following method calls:
isApiSupported
,isAvailable
, andinstallHealthConnect
.The text was updated successfully, but these errors were encountered: