val dataType = call.argument<String>("dataTypeKey")!!
val interval = call.argument<Long>("interval")!!
val startTime = Instant.ofEpochMilli(call.argument<Long>("startTime")!!)
val endTime = Instant.ofEpochMilli(call.argument<Long>("endTime")!!)
And note the difference in parameter names for dataTypeKey vs dataTypeKeys and also for interval vs activitySegmentDuration.
Steps to Reproduce
Calling getHealthAggregateDataFromTypes with AndroidHealthConnect raises java.lang.NullPointerException.
Return data aggregated in buckets of specified interval.
Actual Behavior
Throwing java.lang.NullPointerException
Flutter Logs
No response
Screenshots
No response
Flutter Doctor Output
[√] Flutter (Channel stable, 3.24.2, on Microsoft Windows [Version 10.0.22631.4460], locale en-NL)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.4)
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and
include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2024.1)
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.92.2)
[√] Connected device (4 available)
[√] Network resources
Plugin Name
health
Plugin Version
11.1.0
Device
Android
Operating System
14
Describe the bug
There appears to be a mismatch of argument names between Flutter bridge and Kotlin code:
Compare
health_plugin.dart
:compare with Kotlin implementation:
And note the difference in parameter names for
dataTypeKey
vsdataTypeKeys
and also forinterval
vsactivitySegmentDuration
.Steps to Reproduce
Calling
getHealthAggregateDataFromTypes
with AndroidHealthConnect raisesjava.lang.NullPointerException
.Expected Behavior
Return data aggregated in buckets of specified interval.
Actual Behavior
Throwing
java.lang.NullPointerException
Flutter Logs
No response
Screenshots
No response
Flutter Doctor Output
Additional Information
No response