-
Notifications
You must be signed in to change notification settings - Fork 669
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] Add getHealthConnectSdkStatus #941
[health] Add getHealthConnectSdkStatus #941
Conversation
Health release 10.0.0
Health version 10.1.0
57a132e
to
f096bd4
Compare
ffc27af
to
82edf4d
Compare
82edf4d
to
ddbb06d
Compare
requestPermissionActivityContract | ||
) { granted -> onHealthConnectPermissionCallback(granted) } | ||
} | ||
healthConnectRequestPermissionsLauncher = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to always be done now since doing it later (after the user installed Health Connect) is no longer possible.
@@ -2449,6 +2448,17 @@ class HealthPlugin(private var channel: MethodChannel? = null) : | |||
result.success(null) | |||
} | |||
|
|||
private fun getHealthConnectSdkStatus(call: MethodCall, result: Result) { | |||
checkAvailability() | |||
if (healthConnectAvailable) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Availability could have changed since the sdk was set up, so we need to make sure the client exists in those cases or the other methods will crash.
This has now been released in 10.2.0 |
Tested to work on a API Level 28 emulator.