Skip to main content

sahha_flutter 1.5.2 copy "sahha_flutter: ^1.5.2" to clipboard
sahha_flutter: ^1.5.2 copied to clipboard

Sahha Flutter Plugin

1.5.2 #

Moves to the native 1.5.2 SDKs: a fix for an iOS crash shortly after start-up, getDemographic, getScores and getBiomarkers results that are the same on iOS and Android, and a fix for a foreground service that Android refused.

Added #

  • iOS: getScores and getBiomarkers return every field the Sahha API sends, including fields the API adds after this release, as Android already does.
  • iOS: if HealthKit answers one of the SDK's requests twice, the SDK reports it to Sahha as an error starting "HealthKit repeated a completion", naming the call, the sensor where there is one, and both answers.

Changed #

  • iOS: getDemographic now always returns the demographic as Sahha stores it: gender as Male, Female or Gender Diverse, and birthDate as a date-time such as 1990-05-20T00:00:00. These are the values Android returns. For the first hour after postDemographic, earlier versions returned the strings the app had posted (for example female and 1990-05-20) and switched to the stored form afterwards. If your app compares the result with what it posted, or reads birthDate as a plain date, allow for the stored form.
  • iOS: the first getDemographic after postDemographic reads from Sahha instead of the device, so it needs a connection. Without one it throws a PlatformException.
  • iOS: the JSON from getScores and getBiomarkers is now the API's response as it was sent. Keys are in the API's order and the same on every call, and / is no longer written as \/ (a unit reads mg/dL, not mg\/dL). The values are the same as before, so an app that parses the JSON needs no change.
  • Updated iOS to 1.5.2 — check release notes https://github.com/sahha-ai/sahha-ios/releases
  • Android: diagnostic reports now say whether Android will let sync run as a health foreground service.
  • Updated Android to 1.5.2 — check release notes https://github.com/sahha-ai/sahha-android-sdk/releases

Fixed #

  • iOS: an app could crash within seconds of configure or authenticate when HealthKit answered one of the SDK's requests twice. The SDK now takes the first answer and ignores a repeat.
  • iOS: after posting only gender or only birthDate, getDemographic returned just that field for up to an hour, even when the profile had the other one stored. It now returns both.
  • iOS: getScores no longer throws a PlatformException when a score or one of its factors has no value for state, score, value or goal. The score is returned with null in that field, as on Android.
  • Android: getScores and getBiomarkers now return an empty JSON array ([]) when there is nothing to return, the same as iOS. They returned {}. If your app compares the result with '{}' to detect "no data", check for an empty list instead.
  • Android: on Android 14 and later, sync no longer asks for a health foreground service that Android refuses. When the app holds none of the permissions that type needs (the SDK declares ACTIVITY_RECOGNITION), sync runs without one, and WorkManager no longer logs a SecurityException on every sync.
  • Android: after such a refusal the SDK went on as if sync were a foreground service. It now checks that the service really started. When it has not, a sync cycle that runs after the app is left reads Health Connect only if background read is granted.

1.5.0 #

Moves to the native 1.5.0 SDKs: fixes for HealthKit sync and background uploads on iOS (including iOS 27), and for memory use and sync reliability with Health Connect on Android.

Added #

  • iOS: HealthKit query timeout reports now include the page size, sync progress, query-slot usage and app state, so a slow sync can be diagnosed from the Sahha dashboard.

Changed #

  • iOS: getDemographic now resolves with null when the profile has no demographic stored, matching Android. Previously it threw a PlatformException. Real errors still throw as before.
  • iOS: HealthKit sync runs at most four queries at once across all sensors, so a launch with many enabled sensors no longer queries HealthKit for all of them at the same time.
  • iOS: device lock and unlock events upload at high priority, alongside health data.
  • Android: diagnostic reports are queued and sent when the network is available; a report that fails because the device is offline is no longer logged as an error.
  • Android: only one sync cycle runs at a time; a sync requested while another is running runs as a follow-up cycle.
  • The example app builds and launches with Xcode 27 and the iOS 27 SDK (UIScene lifecycle, pod deployment targets raised to iOS 15.0).
  • Updated iOS to 1.5.0 — check release notes https://github.com/sahha-ai/sahha-ios/releases
  • Updated Android to 1.5.0 — check release notes https://github.com/sahha-ai/sahha-android-sdk/releases

Fixed #

  • iOS: a health data type no longer stops collecting for good after a large deletion in Apple Health (such as a sync app rewriting its history); collection continues past the deleted records.
  • iOS: a sensor whose HealthKit query keeps timing out now fetches smaller pages instead of retrying the same query, so it keeps making progress.
  • iOS: the app is no longer terminated when a HealthKit background sync or background upload outlasts its background time; unsent data stays queued for the next upload.
  • iOS 27: a permission request made straight after another one (including two enableSensors calls in a row for new sensors) now shows its Health sheet and completes, instead of failing after two minutes.
  • iOS: data collected on a background wake is uploaded once, and data queued just as an upload finished is sent straight away.
  • iOS: a failed or interrupted upload no longer leaves duplicate copies of the batch in the on-device retry queue.
  • iOS: a profile with no demographic stored now gets its gender and birth date filled in from Apple Health where the user has allowed it, instead of logging an error on every launch.
  • Android: no more out-of-memory crashes on devices with a large Health Connect backlog; data is read and uploaded page by page, and an interrupted first sync resumes where it stopped.
  • Android: Health Connect records are no longer lost when a sync is stopped, the app is killed mid-sync, or the device details upload fails.
  • Android: a failing upload batch is tried once per sync cycle instead of up to 100 times.
  • Android: getStats no longer returns 0 for the average resting heart rate.
  • Android: postDemographic accepts gender in any letter case (for example "male").
  • Android: deauthenticate clears every copy of the sign-in and waits for a running sync to finish, so nothing is sent or written for the old profile afterwards.
  • Android: the sync on device boot no longer runs while signed out or with no sensors enabled, and a sync requested while an earlier one was waiting to retry now runs straight away.
  • Android: the foreground sync notification no longer shows the placeholder text "Title" and "Short description" when notificationSettings leaves them out; the Sahha SDK's default text is used instead.

1.4.0 #

Stable release of the 1.4.0 line, consolidating the 1.4.0-beta.1 and 1.4.0-beta.2 changes with the final native 1.4.0 SDKs.

Added #

  • engagement biomarker category in SahhaBiomarkerCategory.
  • Android: skipped unreadable Health Connect records are now reported to Sahha error telemetry, so affected devices are visible without device logs.

Changed #

  • Breaking: SahhaBiomarkerCategory now contains exactly the six documented categories (activity, body, engagement, nutrition, sleep, vitals). Removed characteristic and reproductive, which never returned biomarker data.
  • Breaking: renamed SahhaBiomarkerType.activity_mid_intensity_duration to activity_medium_intensity_duration, matching the server vocabulary — the old name always returned no data.
  • Deprecated getStats and getSamples — use getBiomarkers to read server-processed biomarkers instead.
  • Stat and sample category values now carry the sensor's data-log logType — the same label stamped on uploaded data on both platforms: heart rate types report heart, blood pressure/glucose report blood, oxygen/VO2 max/respiratory rate report oxygen, temperature types report temperature, and energy/daylight types report energy. vitals no longer appears.
  • Rebuilt the example app as a full SDK testing harness.
  • Updated iOS to 1.4.0 — check release notes https://github.com/sahha-ai/sahha-ios/releases
  • Updated Android to 1.4.0 — check release notes https://github.com/sahha-ai/sahha-android-sdk/releases

Fixed #

  • iOS: sensor sets with no HealthKit-backed types (such as device_lock alone, or Android-only sensors) no longer make permission requests throw "Health data types not specified" — requesting permissions now succeeds as a no-op and sensor status reports correctly through the normal lifecycle.
  • iOS: enableSensors no longer risks hanging indefinitely without invoking its callback; profile token refresh and session-expiry handling are hardened against transient network and server errors.
  • Android: enableSensors reports the real sensor status reliably (the native callback now returns a SahhaSensorStatus).
  • Android: eliminated phantom step spikes caused by step-counter regressions and implausible jumps; reboots are detected reliably, and steps recorded during collection outages are recovered.
  • Android: Health Connect reads now step around records the client library cannot parse instead of dropping the surrounding data, and an interrupted read no longer advances the sync marker past unread data.
  • Android: getSamples for steps no longer returns empty or partial results after background sync has run, and queries no longer interfere with upload de-duplication.
  • Android: device-lock events are now stamped with the correct phone form factor.

1.4.0-beta.2 #

Added #

Changed #

Fixed #

  • Android: getSamples for steps no longer returns empty or partial results — step queries previously shared the background upload pipeline's de-duplication state, hiding records already collected by sync (fixed in the native 1.4.0-beta.2 release).

1.4.0-beta.1 #

Added #

  • engagement biomarker category in SahhaBiomarkerCategory.

Changed #

  • Breaking: SahhaBiomarkerCategory now contains exactly the six documented categories (activity, body, engagement, nutrition, sleep, vitals). Removed characteristic and reproductive, which never returned biomarker data.
  • Breaking: renamed SahhaBiomarkerType.activity_mid_intensity_duration to activity_medium_intensity_duration. The old name was outside the documented vocabulary and silently returned no data.
  • Deprecated getStats and getSamples — use getBiomarkers to read server-processed biomarkers instead.
  • Stat and sample category values are now labeled with the sensor's data-log logType: heart rate types report heart, blood pressure/glucose report blood, oxygen/VO2 max/respiratory rate report oxygen, temperature types report temperature, and energy/daylight types report energy. vitals no longer appears.
  • Rebuilt the example app as a full testing harness — biomarker, score, stats and samples query screens with type selectors and date ranges, a checked-list sensor permissions screen, a per-sensor diagnostics screen, and a Material 3 UI.
  • Updated iOS to 1.4.0-beta.1 — check release notes https://github.com/sahha-ai/sahha-ios/releases
  • Updated Android to 1.4.0-beta.1 — check release notes https://github.com/sahha-ai/sahha-android-sdk/releases

Fixed #

  • iOS: enableSensors callback no longer hangs indefinitely; hardened token refresh and session-expiry handling.
  • Android: enableSensors reports sensor status reliably, plus Health Connect read-robustness fixes from the native 1.4.0-beta.1 release.

1.3.9 #

Added #

Changed #

Fixed #

  • Fixed an Android crash in host apps that don't include a res/drawable/notification icon — the background collection and sync notifications now fall back to a bundled Sahha icon instead of crashing with Invalid notification (no valid small icon).

1.3.9-beta.5 #

Added #

Changed #

Fixed #


1.3.9-beta.4 #

Added #

Changed #

Fixed #

  • Fixed an Android crash in host apps that don't include a res/drawable/notification icon — the background collection and sync notifications now fall back to a bundled Sahha icon instead of crashing with Invalid notification (no valid small icon).

1.3.9-beta.2 #

Added #

Changed #

Fixed #


1.3.9-beta.1 #

Added #

Changed #

Fixed #


1.3.8 #

Added #

Changed #

  • n/a

Fixed #

  • Fixed issue on Android where GetSensorStatus reporting IOS sensors

1.3.7 #

Added #

Changed #

  • n/a

Fixed #

  • Fixed issue on Android and IOS where GetSensorStatus was not reporting if background services were running.

1.3.5 #

Added #

  • New Android SDK integrated, this is a full refactor of the Sahha Android SDK.
  • Improved Native Step and Sleep tracking - Requires Android Manifest to include Write permissions for Steps and Sleep.
  • New Synchronisation and batching logic for Android.

Changed #

  • Upgraded to the latest stable Flutter version 3.38.7.
  • Updated to the latest supported Dart version 3.10.7.
  • Upgraded to the latest AGP version 9.0.
  • Upgraded Kotlin to the latest stable version 2.3.0.
  • Motion Permission is now optional, this can be configured on or off by passing enableMotionTrigger: true to the configure function.
  • Background task protection and Upload loop reliability improved.

Fixed #

  • Fixed a bug where the network monitor couldn't restart after being stopped.
  • Fixed discrepancy between Android and IOS Score / Biomarker response objects.
  • Fixed issue where IOS was returning Score Factors without ID or Unit.

1.3.3 #

Added #

  • Implemented 1.3.3 Sahha IOS SDK.

Changed #

  • n/a

Fixed #

  • n/a

1.3.1 #

Added #

  • Implemented new Sahha IOS SDK.

Changed #

  • n/a

Fixed #

  • n/a

1.2.7 #

Added #

  • Hot patch to resolve issue with android foreground service not starting in time. Under some conditions this would cause a crash.

Changed #

  • n/a

Fixed #

  • n/a

1.2.6 #

Added #

  • n/a

Changed #

  • n/a

Fixed #

  • n/a

1.2.5 #

Added #

  • Synchronised version with other SDK's
  • Fixed bug with IOS26 blood pressure requiring both Systolic and Diastolic permission.

Changed #

  • n/a

Fixed #

  • n/a

1.2.1 #

Added #

  • Adding energy_consumed data point.

Changed #

  • n/a

Fixed #

  • n/a

1.2.0 #

Added #

  • Added nutrition data.
  • Added compatibility for androidx.lifecycle:lifecycle-runtime-ktx 2.8.7

Changed #

  • n/a

Fixed #

  • n/a

1.1.9 #

Added #

  • n/a

Changed #

  • n/a

Fixed #

  • (iOS) Reverted back to stable iOS version

1.1.8 #

Added #

  • n/a

Changed #

  • (iOS) Changed how data is ingested from HealthKit

Fixed #

  • (iOS) Fixed issue with data ingestion causing extreme memory usage

1.1.7 #

Added #

  • (iOS) Added postSensorData method

Changed #

  • (Android) Updated com.google.android.gms:play-services-location dependency to the latest version

Fixed #

  • n/a

1.1.5 #

Added #

  • Added aggregates to data logs
  • Added new activity sensors

Changed #

  • Changed how app session logs are formatted

Fixed #

  • (Android) Fixed an issue that could cause unnecessary battery drain
  • (Android) Fixed an issue where the foreground service would launch intermittently
  • (Android) Added namespace declaration to build.gradle

1.1.4 #

Added #

  • Added category to samples and stats
  • Added deviceId to the data logs
  • Added exercise stats
  • (iOS) Added optional stats list on samples

Changed #

  • (Android) Made changes to how native sleep collection is handled
  • (Android) Improved how the SDK handles large amounts of data logs at once

Fixed #

  • (Android) Fixed an issue for Android version 13 and below regarding behaviour between installing HealthConnect during the permission flow

1.1.1 #

Added #

  • (Android) Added rules for consumer-rules.pro for developers using pro guard obfuscation

Changed #

  • Adjusted sleep data window to 6pm - 6pm for getStats
  • Added a deviceId to device information
  • (iOS) Split Stats by source

Fixed #

  • (Android) Fixed an issue when posting data was not being cancelled when de-authenticating

1.1.0 #

Added #

  • Added recordingMethod parameter to getSamples method

Changed #

  • n/a

Fixed #

  • (iOS) Fixed async errors for app lifecycle events
  • (Android) Fixed an issue where getSensorStatus may sometimes not return a status

1.0.9 #

Added #

  • Added getSamples method

Changed #

  • Renamed instances of startDate / endDate to startDateTime / endDateTime

Fixed #

  • (iOS) Fixed incorrect startDateTime / endDateTime for getStats sleep stats

1.0.8 #

Added #

  • Added getStats method

Changed #

  • Renamed getScores and getBiomarkers method parameters
  • Renamed the step_count sensor to steps
  • Renamed the floor_count sensor to floors_climbed

Fixed #

n/a


1.0.6 #

Added #

  • Added getBiomarkers to retrieve biomarker data
  • Added app event logs for lifecycle changes

Changed #

  • (Android) Changed authenticate to return an "in progress" error if an authentication is already in progress
  • (Android) Adjusted metadata for data logs

Fixed #

  • (Android) Hotfixed an issue where device information sometimes would not send

Note: The MainActivity within the project's android folder will need to be changed to use FlutterFragmentActivity instead.


1.0.5 #

Added #

n/a

Changed #

n/a

Fixed #

  • (Android) Fixed an issue where null demographics was treated as an error — new profiles will always have null demographics, which is not an error.
  • (Android) Implemented a potential fix for occasional foreground service crashes.

1.0.4 #

Added #

n/a

Changed #

  • Updated to Flutter version 7

Fixed #

n/a


1.0.3 #

Added #

n/a

Changed #

n/a

Fixed #

  • (Android) Resolved an issue where applying metadata to native sleep data could cause crashing

1.0.2 #

Added #

  • (Android) Added metadata to logs
  • (Android) Added appVersion to device information

Changed #

n/a

Fixed #

  • (Android) Fixed an issue where the endDateTime timestamps were incorrect for historical step data

1.0.1 #

Added #

n/a

Changed #

n/a

Fixed #

  • (Android) Resolved an issue where under certain circumstances, native step data would stop collecting (Health Connect step data unrelated)
  • (Android) Resolved an issue where certain permission states were incorrectly returning unavailable specifically for Android version 9 (API 28)

1.0.0 #

Added #

  • Added getScores method

Changed #

  • Removed analyze method

Fixed #

  • Fixed recording method strings
  • (Android) Fixed a bug where in specific scenarios, incorrect permission statuses were returned
  • (Android) Fixed a data filtering bug

0.4.5 alpha #

Added #

  • (Android) Improved the quality of step data being sent to Sahha API

Changed #

  • Changed getSensorStatus and enableSensors method parameters to require an explicit list of sensors

Fixed #

  • (iOS) Delete credentials if API response is unauthorized
  • (Android) Fixed a bug where the foreground service would attempt to periodically restart
  • (Android) Fixed a minor bug when batching data

0.4.4 alpha #

Added #

  • n/a

Changed #

  • (iOS) Moved data handling and posting to a dedicated data manager
  • (Android) Improved data handling and posting

Fixed #

  • (iOS) Fixed missing device information for logging
  • (iOS) Fixed warnings for missing credentials
  • (Android) Fixed deauthentication to properly halt background tasks and reset data

0.4.3 alpha #

Added #

  • n/a

Changed #

  • n/a

Fixed #

  • (iOS) Fixed crash when configuring sensors
  • (iOS) Fixed loop when trying to refresh auth token
  • (iOS) Fixed deauthenticate method if credentials were missing

0.4.2 alpha #

Added #

  • n/a

Changed #

  • Moved sensor configuration from the configure method to getSensorStatus and enableSensors methods

Fixed #

  • n/a

0.4.1 alpha #

Added #

  • n/a

Changed #

  • (Android) Improved how Health Connect is queried in the background, removing the need for exact alarms and its manifest permission

Fixed #

  • (iOS) Fixed device info uploading duplicate entries
  • (iOS) Fixed HKObserverQuery callback not firing after error

0.4.0 alpha #

Added #

  • Added exercise sensor
  • (iOS) Collected gender and birth date from HealthKit

Changed #

  • Improved batching of sensor data uploads
  • (Android) Permissions must be added manually by the developer to AndroidManifest.xml
  • (Android) Improved how Health Connect data is queried
  • (Android) Adjusted how sensor data percentages are formatted
  • (iOS) Increased historical sensor data from 7 days to 30 days

Fixed #

  • (Android) Fixed sleep value formatting
  • (Android) Fixed a bug which caused diastolic blood pressure data to be missing

0.3.9 alpha #

Added #

  • n/a

Changed #

  • (Android) Permissions must be added manually by the developer to AndroidManifest.xml
  • (iOS) Using configure method with an empty sensor value returns a pending sensor status

Fixed #

  • n/a

0.3.8 alpha #

Added #

  • n/a

Changed #

  • (Android) Improvements to ensure important background tasks continue running
  • (Android) Upgraded to latest Gradle version

Fixed #

  • (Android) Fixed a bug that would sometimes crash on initial launch
  • (Android) Fixed a bug that could lock up the UI on lower Android OS versions
  • (Android) Fixed a bug where permission status would return disabled when it should be unavailable on lower Android OS versions

0.3.7 alpha #

Added #

  • n/a

Changed #

  • (iOS) Deauthorize user if API returns 410 error code

Fixed #

  • (iOS) Fixed frequency of some insights
  • (Android) Fixed configuration callback error

0.3.5 alpha #

Added #

  • Added temperature SahhaSensor enum

Changed #

  • n/a

Fixed #

  • (iOS) Fixed some insights not posting correctly

0.3.4 alpha #

Added #

  • Added temperature sensor data
  • Added additional error logging

Changed #

  • Renamed data_types and insight_types to snake_case
  • Removed manual postSensorData method

Fixed #

  • (Android) Fixed some insights not posting correctly
  • (Android) Fixed some demographics not posting correctly
  • (iOS) Fixed some sensor data not posting correctly

0.3.3 alpha #

Added #

  • Added new sensor types
  • Added new insights

Changed #

  • Renamed pedometer sensor to activity sensor

Fixed #

  • n/a

0.3.2 alpha #

Added #

  • (Android) Support for Health Connect on devices below Android 14

Changed #

  • (iOS) Changed sleep stage enum values

Fixed #

  • n/a

0.3.1 alpha #

Added #

  • (Android) Support for Health Connect on devices with Android 14

Changed #

  • n/a

Fixed #

  • n/a

0.3.0 alpha #

Added #

  • Added insights for sleep and steps

Changed #

  • n/a

Fixed #

  • n/a

0.2.4 alpha #

Added #

  • Added error logging
  • Added authenticate via profileToken
  • Added analyzeDateRange method

Changed #

  • Changed library interface

Fixed #

  • n/a

0.2.3 alpha #

Added #

  • n/a

Changed #

  • n/a

Fixed #

  • (Android) Fixed analyze call parameters

0.2.2 alpha #

Added #

  • n/a

Changed #

  • Removed redundant includeSourceData for calling analyze

Fixed #

  • (Android) Fixed an issue that would sometimes cause the configure method to hang

0.2.1 alpha #

Added #

  • n/a

Changed #

  • (Android) Removed redundant sensor permissions from Android manifest
  • (Android) Improved how data is sent to the server

Fixed #

  • n/a

0.2.0 alpha #

Added #

  • Added heart and blood sensors

Changed #

  • Changed authenticate method to take appId, appSecret, externalId as parameters

Fixed #

  • n/a

0.1.6 alpha #

Added #

  • n/a

Changed #

  • (iOS) Improved background sensor data collection

Fixed #

  • n/a

0.1.5 alpha #

Added #

  • n/a

Changed #

  • (iOS) lower minimum iOS version to 12

Fixed #

  • n/a

0.1.4 alpha #

Added #

  • n/a

Changed #

  • n/a

Fixed #

  • (iOS) Configuration callback possibly fired multiple times

0.1.3 alpha #

Added #

  • n/a

Changed #

  • n/a

Fixed #

  • (Android) Fixed sleep receiver crashing

0.1.2 alpha #

Added #

  • Added user device information

Changed #

  • n/a

Fixed #

  • n/a

0.1.1 alpha #

Added #

  • Added callback to configure method

Changed #

  • n/a

Fixed #

  • n/a

0.1.0 alpha #

Added #

  • n/a

Changed #

  • Refactored sensor methods

Fixed #

  • n/a

0.0.7 alpha #

Added #

  • Custom notification settings for Android

Changed #

  • n/a

Fixed #

  • n/a

0.0.6 alpha #

Added #

  • Added more demographic parameters
  • Added pedometer sensor
  • Added an optional list of sensor data used for analyzation

Changed #

  • n/a

Fixed #

  • Fixed some issues with missing sensor data on Android and iOS

0.0.5 alpha #

Added #

  • n/a

Changed #

  • Changed analyze method to use double instead of long for iOS

Fixed #

  • n/a

0.0.4 alpha #

Added #

  • n/a

Changed #

  • n/a

Fixed #

  • Sensor permission error on Android

0.0.3 alpha #

Added #

  • Health sensor data updates while app is in background (iOS)
  • Analyze endpoint takes an optional range of dates to include

Changed #

  • n/a

Fixed #

  • n/a

0.0.2 alpha #

Added #

  • n/a

Changed #

  • Refactored Health Activity -> Sleep Sensor
  • Refactored Motion Activity -> Pedometer Sensor

Fixed #

  • n/a

0.0.1 alpha #

Added #

  • Authentication
  • Demographic
  • Health Activity
  • Motion Activity
  • Analyzation

Changed #

  • n/a

Fixed #

  • n/a
1
likes
110
points
492
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Sahha Flutter Plugin

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

file, flutter

More

Packages that depend on sahha_flutter

Packages that implement sahha_flutter