Changelog
2.4.0-alpha01
- Improved logging
2.3.1
- Fixed sleep rem and deep calculations
2.3.0
- Fixed Xiaomi missing timezone
Breaking change
The following properties types were changed from Instant to ZonedDateTime:
- HCSleepSummary
- dateTime
- sleepStartDateTime
- sleepEndDateTime
- HCPhysicalSummary
- dateTime
- HCBodySummary
- dateTime
- HCActivityEvent
- dateTime
- activityStartDateTime
- activityEndDateTime
2.2.1
What's new since 2.1.0
- Migrated to 16KB page size
- Added
getAuthorizedDataSourcesV2toRookDataSources(Instance/Companion), This is an improved version ofgetAuthorizedDataSourcesthat returns a list ofAuthorizedDataSourceV2with the name, authorization status and image URL of each data source. - Improved Samsung Health metrics calculation.
- Improved logging
- Added optional parameter
cancelAndRescheduletoRookBackgroundSyncManager(Instance/Companion), If true, cancels any previously scheduled or currently running background sync and schedules a new one. False by default.
Local Summaries and Activity
You can now get a local copy of a Sleep Summary, Physical Summary, Body Summary and Activity events after syncing, check the documentation for more details.
Deprecated components removed
- Removed
RookEventManagerandRookSummaryManager, go to the new manual sync section to check the new way of syncing health data manually.
Dependency updates
- net.zetetic:sqlcipher-android: 4.6.0 → 4.7.0
2.2.0-alpha01
- Migrated to 16KB page size
- Added
getAuthorizedDataSourcesV2toRookDataSources(Instance/Companion), This is an improved version ofgetAuthorizedDataSourcesthat returns a list ofAuthorizedDataSourceV2with the name, authorization status and image URL of each data source. - Improved Samsung Health metrics calculation.
Local Summaries and Activity
You can now get a local copy of a Sleep Summary, Physical Summary, Body Summary and Activity events after syncing, check the documentation for more details.
Deprecated components removed
- Removed
RookEventManagerandRookSummaryManager, go to the new manual sync section to check the new way of syncing health data manually.
Dependency updates
- net.zetetic:sqlcipher-android: 4.6.0 → 4.7.0
2.1.0
What's new since 2.0.0
- Reduced the recovery time that automatic syncs will wait before syncing again when Health Connect rate limit is exceeded to 45 minutes.
- Fewer restrictions on manual syncs after Health Connect rate limit is exceeded.
- Optimized metadata logging
- Optimized time zone syncing
2.1.0-alpha02
- Reduced the recovery time that automatic syncs will wait before syncing again when Health Connect rate limit is exceeded to 45 minutes.
- Fewer restrictions on manual syncs after Health Connect rate limit is exceeded.
2.1.0-alpha01
- Optimized metadata logging
- Optimized time zone syncing
2.0.0
Android 15
- Updated
compileSdkandtargetSdkto 35.
Background Sync
- Health Connect now supports background data reads, a new class;
RookBackgroundSyncManagerwas added to schedule data synchronizations every hour, see the Background sync documentation to learn more. - Added experimental function
isScheduledFlowtoRookBackgroundSyncManager(Instance and Companion) to get real-time background sync schedule state updates. - Added
EXTRA_HEALTH_CONNECT_BACKGROUND_PERMISSION_GRANTEDto check if background read permission was granted by the user. Note that if this device does not support background read, this will be false. This extra will always be included in theACTION_HEALTH_CONNECT_PERMISSIONSaction. - Added new
backgroundReadGrantedproperty toHealthConnectPermissionsSummaryto check if background read permission was granted by the user. Note that if this device does not support background read, this will be false. - The function
requestHealthConnectPermissionsinRookPermissionsManager(Instance and Companion) will also ask for the permission to read data in background (if the device supports it). - Not all devices support background reads, some may have to update its Health Connect application, to check
compatibility a new function;
checkBackgroundReadStatuswas added toRookPermissionsManager(Instance and Companion). Go to the Background Read permissions section in the documentation to learn more.
Deprecated components removed
- Removed deprecated non-context variant of
getAvailableDataSourcesfrom RookDataSources (Companion). - Removed deprecated non-context variant of
revokeDataSourcefrom RookDataSources (Companion). - Removed deprecated non-context variant of
syncTodayAndroidStepsCountfrom RookStepsManager (Companion). - Removed deprecated property
DataSource.image: Replace withDataSource.imageUrl. - Removed deprecated enum SyncInstruction: No longer used by
yesterdaySync. - Removed deprecated class
RookHealthPermissionsManager. - Removed deprecated function
shouldSyncForfrom RookHelpers:RookSyncManageralready uses it internally (HealthDataTypewas also removed). - Removed deprecated function
hasPermissionsfrom RookStepsManager (Companion). - Removed deprecated function
requestPermissionsfrom RookStepsManager (Companion). - Removed deprecated class
RookStepsPermissions. - Removed deprecated class
RookYesterdaySyncPermissions.
Removed old storage
The encrypted preferences storage was superseded by secure storage introduced in 1.6.0-alpha01.
All SDK versions starting from 1.6.0-alpha01 have a procedure to migrate the data from the old storage to the new storage during SDK initialization, if you are upgrading from version 1.6.0-alpha01+ you don't need to do anything as your data is already in the new storage.
If you are upgrading from a version prior to 1.6.0-alpha01 you may need to re-do the SDK initialization and user initialization steps.
Aggregate based calculation
In order to increase accuracy of data we increased our usage of Health Connect's aggregate API for Min, Avg and Max values calculation (where possible, otherwise raw data based calculation was left as it was).
Below you will see a table describing which health data was migrated to the aggregate API.
| Health data | Calculation procedure | Calculated values |
|---|---|---|
| Hydration | Aggregate API | Total |
| Steps | Aggregate API | Total |
| Floors Climbed | Aggregate API | Total |
| Elevation Gained | Aggregate API | Total |
| Heart Rate | Aggregate API | MIN, AVG, MAX |
| Resting Heart Rate | Aggregate API | AVG |
| Weight | Aggregate API | AVG |
| Height | Aggregate API | AVG |
| Blood Pressure | Aggregate API | AVG |
| Speed | Aggregate API | AVG, MAX |
| Steps Cadence | Aggregate API | AVG, MAX |
| Power | Aggregate API | AVG, MAX |
| Cycling Pedaling Cadence | Aggregate API | MIN, AVG, MAX |
It is highly recommended to use the min, avg, max values instead of granular data to avoid issues with duplicate data when 2 or more apps are writing to Health Connect.
Bug fixes
- Fixed Health Connect permissions request launcher crash when requesting permissions with an empty list of permissions.
Dependency updates
- androidx.health.connect:connect-client: 1.1.0-alpha07 → 1.1.0-beta01
- androidx.lifecycle:lifecycle-viewmodel-ktx: 2.6.2 → 2.7.0
- androidx.work:work-runtime-ktx: 2.9.0 → 2.9.1
- com.google.android.material:material: 1.10.0 → 1.12.0
- androidx.appcompat:appcompat: 1.6.1 → 1.7.0
- androidx.core:core-ktx: 1.7.0 → 1.15.0
- Gradle: 8.2.0 → 8.6.1
- Kotlin: 1.8.10 → 1.9.24
- com.google.devtools.ksp: New → 1.9.24-1.0.20
- org.jetbrains.kotlin.kapt: 1.8.10 → Removed
- org.jetbrains.kotlinx:kotlinx-serialization-json: 1.5.0 → 1.6.3
- com.google.crypto.tink:tink-android: 1.4.0-rc2 → Removed
1.11.0
What's new since 1.10.0
RookSummaryManagerandRookEventManagerhave been deprecated and will be replaced byRookSyncManager, go to the new manual sync section to check the new way of syncing health data manually.- Fixed physical events speed, cadence and power "extra" granular data bug when there are 2 or more exercise sessions in the same day.
- Improved event syncing of
RookContinuousUploadManager.launchInForegroundService - The functions
RookDataSources.getAvailableDataSourcesandRookDataSources.presentDataSourceView( Instance/Companion) have been deprecated, useRookDataSources.getDataSourceAuthorizer(Instance/Companion) to get a more efficient and scalable solution, reducing unnecessary data retrieval.˚ If you previously relied onRookDataSources.getAvailableDataSourcesto build your own connections page, you can change toRookDataSources.getAuthorizedDataSourcesto get the authorization state of each API data source however you will need to use your own assets if you want to show an image. - Added new variant of
revokeDataSourcethat accepts a string as the data source type toRookDataSources( Instance/Companion).
BREAKING CHANGES
AuthorizedDataSourcesproperties have been changed to nullable in order to show data source availability.- Added Dexcom to
AuthorizedDataSourcesproperties.
- Added Dexcom to
Dependency updates:
- com.squareup.moshi:moshi-kotlin-codegen: 1.15.0 → 1.15.1
- com.squareup.moshi:moshi: 1.15.0 → 1.15.1
- com.squareup.retrofit2:converter-moshi: 2.9.0 → 2.11.0
- com.squareup.okhttp3:logging-interceptor: 4.11.0 → 4.12.0
- androidx.room:room-compiler: 2.5.2 → 2.6.1
- androidx.room:room-ktx: 2.5.2 → 2.6.1
- androidx.room:room-runtime: 2.5.2 → 2.6.1
- androidx.sqlite:sqlite: 2.3.1 → Removed
1.11.0-alpha02
- The functions
RookDataSources.getAvailableDataSourcesandRookDataSources.presentDataSourceView( Instance/Companion) have been deprecated, useRookDataSources.getDataSourceAuthorizer(Instance/Companion) to get a more efficient and scalable solution, reducing unnecessary data retrieval. If you previously relied onRookDataSources.getAvailableDataSourcesto build your own connections page, you can change toRookDataSources.getAuthorizedDataSourcesto get the authorization state of each API data source however you will need to use your own assets if you want to show an image. - Added new variant of
revokeDataSourcethat accepts a string as the data source type toRookDataSources( Instance/Companion).
BREAKING CHANGES
AuthorizedDataSourcesproperties have been changed to nullable in order to show data source availability.- Added Dexcom to
AuthorizedDataSourcesproperties.
- Added Dexcom to
1.11.0-alpha01
RookSummaryManagerandRookEventManagerhave been deprecated and will be replaced byRookSyncManager, go to the new manual sync section to check the new way of syncing health data manually.- Fixed physical events speed, cadence and power "extra" granular data bug when there are 2 or more exercise sessions in the same day.
- Improved event syncing of
RookContinuousUploadManager.launchInForegroundService
1.10.0
What's new since 1.9.0
- Added
getTodayCaloriesCounttoRookEventManagerto sync the calories count of the current day, if successful it will return aSyncStatusWithData.Syncedobject with theDailyCaloriesobject that was uploaded orSyncStatusWithData.RecordsNotFoundif the SDK could not find any calories records. For more information see the example. - Changed
syncTodayHealthConnectStepsCountreturn type fromSyncStatusWithData<Int?>toSyncStatusWithData<Int>. - Fixed error when optional metadata tags are not found.
1.10.0-alpha01
- Added
getTodayCaloriesCounttoRookEventManagerto sync the calories count of the current day, if successful it will return aSyncStatusWithData.Syncedobject with theDailyCaloriesobject that was uploaded orSyncStatusWithData.RecordsNotFoundif the SDK could not find any calories records. For more information see the example. - Changed
syncTodayHealthConnectStepsCountreturn type fromSyncStatusWithData<Int?>toSyncStatusWithData<Int>.
1.9.0
What's new since 1.8.0
- RookDataSources
- Added
getAuthorizedDataSourcestoRookDataSources(Instance and Companion) to get a summary of all data sources authorized by the current user. Companion.getAvailableDataSources(redirectUrl)was deprecated, replace with context variant:Companion.getAvailableDataSources(context, redirectUrl)Companion.revokeDataSource(dataSourceType)was deprecated, replace with context variant:Companion.revokeDataSource(context, dataSourceType)
- Added
- RookStepsManager
Companion.syncTodayAndroidStepsCount()was deprecated, replace with context variant:Companion.syncTodayAndroidStepsCount(context)
- Improvements
- Optimized logging
- Bug fixes
- Fixed metrics extraction error on Samsung devices with Android 14+.
- Fixed Body a Physical summaries extraction when only minimal data is available.
- Other
- Increased timeout of health data request to 15 seconds.
New variables
Added new data types BasalBodyTemperature, BodyFat, LeanBodyMass, CyclingPedalingCadence, BoneMass and BodyWaterMass extraction to Physical and Body summaries:
- PhysicalSummary
- cyclingPedalingCadenceMinRpm
- cyclingPedalingCadenceAvgRpm
- cyclingPedalingCadenceMaxRpm
- BodySummary
- basalTemperatureAvgCelsius
- bodyFatAvgPercentage
- leanBodyMassAvgKg
- boneMassAvgKg
- bodyWaterMassAvgKg
Added new permissions:
- android.permission.health.READ_BASAL_BODY_TEMPERATURE
- android.permission.health.READ_BODY_FAT
- android.permission.health.READ_LEAN_BODY_MASS
- android.permission.health.READ_BODY_WATER_MASS
- android.permission.health.READ_BONE_MASS
1.9.0-alpha02
- RookDataSources
Companion.getAvailableDataSources(redirectUrl)was deprecated, replace with context variant:Companion.getAvailableDataSources(context, redirectUrl)Companion.revokeDataSource(dataSourceType)was deprecated, replace with context variant:Companion.revokeDataSource(context, dataSourceType)
- RookStepsManager
Companion.syncTodayAndroidStepsCount()was deprecated, replace with context variant:Companion.syncTodayAndroidStepsCount(context)
- Fixed metrics extraction error on Samsung devices with Android 14+.
- Optimized logging
New variables
Added new data types BasalBodyTemperature, BodyFat, LeanBodyMass, CyclingPedalingCadence, BoneMass and BodyWaterMass extraction to Physical and Body summaries:
- PhysicalSummary
- cyclingPedalingCadenceMinRpm
- cyclingPedalingCadenceAvgRpm
- cyclingPedalingCadenceMaxRpm
- BodySummary
- basalTemperatureAvgCelsius
- bodyFatAvgPercentage
- leanBodyMassAvgKg
- boneMassAvgKg
- bodyWaterMassAvgKg
Added new permissions:
- android.permission.health.READ_BASAL_BODY_TEMPERATURE
- android.permission.health.READ_BODY_FAT
- android.permission.health.READ_LEAN_BODY_MASS
- android.permission.health.READ_BODY_WATER_MASS
- android.permission.health.READ_BONE_MASS
1.9.0-alpha01
- RookDataSources
- Added
getAuthorizedDataSourcestoRookDataSources(Instance and Companion) to get a summary of all data sources authorized by the current user.
- Added
- Other
- Increased timeout of health data request to 15 seconds.
1.8.0
What's new since 1.7.0
- Improvements
- Added current day Steps and Activity events to
rookYesterdaySyncandRookContinuousUploadManager rookYesterdaySyncno longer requires you provide your credentials and environment. It will use the last used credentials and environment.
- Added current day Steps and Activity events to
- RookContinuousUploadManager
- Added
RookContinuousUploadManagerto launch on demand 29 days historic health data synchronizations. Please note that this MUST NOT be used if you are already using therookYesterdaySyncdelegate. Learn more about this in the Continuous Upload section.
- Added
- Permissions Revocation
- Added
revokeHealthConnectPermissionstoRookPermissionsManager(Instance and Companion) to reset all granted Health Connect permissions. Learn more about this in the Revoke permissions section.
- Added
- RookStepsManager
- Added
isBackgroundAndroidStepsActiveto the Companion object ofRookStepsManager. - Added
enableBackgroundAndroidStepsto the Companion object ofRookStepsManager. - Added
disableBackgroundAndroidStepsto the Companion object ofRookStepsManager. - Added
syncTodayAndroidStepsCountto the Companion object ofRookStepsManager.
- Added
- RookDataSources
- Added
getAvailableDataSourcesto the Companion object ofRookDataSources. - Added
revokeDataSourceto the Companion object ofRookDataSources. - Added
presentDataSourceViewto the Companion object ofRookDataSources.
- Added
1.7.0
What's new since 1.6.0
- Breaking changes
- Parameter
onFinishedofRookPermissionsManager.registerPermissionsRequestLauncheris now required. - Parameter
onFinishedofRookPermissionsManager.registerPermissionsRequestLauncherlambda now returns aHealthConnectPermissionsSummaryinstead of a Boolean. HealthConnectPermissionsSummarywill be nullable for the fragment variant ofregisterPermissionsRequestLaunchera null value will be returned if the fragment is not associated with a context.RookPermissionsManager.launchPermissionsRequestnow requires a context.RookPermissionsManager.launchPermissionsRequestwas converted into a suspend function.
- Parameter
- Improvements
- Greatly reduced the recovery time that automatic syncs will wait before syncing again when Health Connect rate limit is exceeded.
- Improved Health Connect permissions requests behavior.
- Added
EXTRA_HEALTH_CONNECT_PERMISSIONS_PARTIALLY_GRANTEDto check if at least one permission was granted by the user. This extra will always be included in theACTION_HEALTH_CONNECT_PERMISSIONSaction. - Added
checkHealthConnectPermissionsPartiallytoRookPermissionsManager(Instance and Companion) to check if at least one Health Connect permission is granted. - Optimized
yesterdaySyncdata extraction procedure. - Added Vo2Max granular data to oxygenation events.
- Bug fixes
- Fixed Samsung Health steps count -1 (the SDK will always add +1 to steps count from Samsung).
- Customizable permissions
- Now the permissions that you remove from the AndroidManifest will affect the behavior of requesting/checking permissions functions, learn more about this in the customizing permissions section.
1.7.0-alpha01
- Breaking changes
- Parameter
onFinishedofRookPermissionsManager.registerPermissionsRequestLauncheris now required. - Parameter
onFinishedofRookPermissionsManager.registerPermissionsRequestLauncherlambda now returns aHealthConnectPermissionsSummaryinstead of a Boolean. HealthConnectPermissionsSummarywill be nullable for the fragment variant ofregisterPermissionsRequestLaunchera null value will be returned if the fragment is not associated with a context.RookPermissionsManager.launchPermissionsRequestnow requires a context.RookPermissionsManager.launchPermissionsRequestwas converted into a suspend function.
- Parameter
- Improvements
- Greatly reduced the recovery time that automatic syncs will wait before syncing again when Health Connect rate limit is exceeded.
- Improved Health Connect permissions requests behavior.
- Added
EXTRA_HEALTH_CONNECT_PERMISSIONS_PARTIALLY_GRANTEDto check if at least one permission was granted by the user. This extra will always be included in theACTION_HEALTH_CONNECT_PERMISSIONSaction. - Added
checkHealthConnectPermissionsPartiallytoRookPermissionsManager(Instance and Companion) to check if at least one Health Connect permission is granted. - Optimized
yesterdaySyncdata extraction procedure.
- Customizable permissions
- Now the permissions that you remove from the AndroidManifest will affect the behavior of requesting/checking permissions functions, learn more about this in the customizing permissions section.
1.6.0
What's new since 1.5.0
- Breaking changes
RookConfiguration.getUserID()was converted into a suspend function.
- Improvements
- Improved sleep summary extraction to prevent bad Samsung Health behavior.
- Bug fixes
- Added a proguard rule to avoid obfuscation of
RookStepsManager.Companion. - Fixed error when trying to delete a user that no longer exists using
RookConfiguration.deleteUserFromRook, in this case the function will return success. - Fixed preferences being restored by Google backup.
- Added a proguard rule to avoid obfuscation of
- Secure storage
- Now you can set the file name and password of the storage that this SDK will use to save sensitive information, read more about this in the security section of the documentation. Please note that this is an optional configuration the SDK will use a default file name and auto-generate a password if you don't set one.
- RookHelpers
RookHelpers.shouldSyncForis deprecated, you no longer need to use this function sinceRookEventManagerandRookSummaryManageralready performs allshouldSyncForchecks.
- DataSources
- Added
revokeDataSourcetoRookDataSourcesthis will allow you to disconnect a user from the providedDataSourceType. - Deprecated property
imageinDataSource, replace withimageUrl.
- Added
Dependency updates
- com.google.crypto.tink:tink-android: New → 1.4.0-rc2
- androidx.security:security-crypto: 1.1.0-alpha01 → Removed
- org.jetbrains.kotlinx:kotlinx-serialization-json: New → 1.5.0
- net.zetetic:sqlcipher-android: New → 4.6.0@aar
- androidx.sqlite:sqlite: New → 2.3.1
1.6.0-alpha02
- Improvements
- Improved sleep summary extraction to prevent bad Samsung Health behaviour.
1.6.0-alpha01
- Breaking changes
RookConfiguration.getUserID()was converted to a suspend function.
- Bug fixes
- Added a proguard rule to avoid obfuscation of
RookStepsManager.Companion. - Fixed error when trying to delete a user that no longer exists using
RookConfiguration.deleteUserFromRook, in this case the function will return success. - Fixed preferences being restored by Google backup.
- Added a proguard rule to avoid obfuscation of
- Secure storage
- Now you can set the file name and password of the storage that this SDK will use to save sensitive information, read more about this in the security section of the documentation. Please note that this is an optional configuration the SDK will use a default file name and auto-generate a password if you don't set one.
- DataSources
- Added
revokeDataSourcetoRookDataSourcesthis will allow you to disconnect a user from the providedDataSourceType. - Deprecated property
imageinDataSource, replace withimageUrl.
- Added
Dependency updates
- com.google.crypto.tink:tink-android: New → 1.4.0-rc2
- androidx.security:security-crypto: 1.1.0-alpha01 → Removed
- org.jetbrains.kotlinx:kotlinx-serialization-json: New → 1.5.0
- net.zetetic:sqlcipher-android: New → 4.6.0@aar
- androidx.sqlite:sqlite: New → 2.3.1
1.5.0
What's new since 1.4.0
- New Permissions class
- The new
RookPermissionsManagerclass will contain an improved version of all permissions functions, follow the single permission class migration guide to successfully migrate all deprecated functions to its new implementation. - Permissions classes deprecations
RookStepsPermissionsand all its functions were deprecated.RookYesterdaySyncPermissionsand all its functions were deprecated.RookHealthPermissionsManagerand all its functions were deprecated.RookStepsPermissions.isAvailable(context)was deprecated.
- The functions
requestHealthConnectPermissionsandrequestAndroidPermissionswill return aRequestPermissionsStatus. - Added broadcast Health Connect permissions, register a broadcast receiver
with
ACTION_HEALTH_CONNECT_PERMISSIONSand useEXTRA_HEALTH_CONNECT_PERMISSIONS_GRANTEDto receive granted/denied status every timerequestHealthConnectPermissionsis called. - Added broadcast Android permissions, register a broadcast receiver with
ACTION_ANDROID_PERMISSIONSand useEXTRA_ANDROID_PERMISSIONS_GRANTEDto receive granted/denied status every timerequestHealthConnectPermissionsis called.
- The new
- Yesterday Sync
rookYesterdaySyncno longer requires thedoOnEndparameter.scheduleYesterdaySyncno longer requires thedoOnEndparameter.RookYesterdaySyncLazyno longer requires thedoOnEndparameter.
- Exceptions
- Removed unused exception
InternalAndroidException - Renamed
MissingPermissionsExceptiontoMissingHealthConnectPermissionsException - New Exceptions
- BadUserTimeZoneException
- UserNotDeletedException
- UserNotRegisteredException
- Removed unused exception
- Other
- Fixed documentation typos
1.5.0-alpha03
- Fixed
shouldRequestAndroidPermissionsreturning false when there is 1 missing permission. - Fixed
requestHealthConnectPermissionsoverriding the value ofregisterPermissionsRequestLauncher. - Added
EXTRA_ANDROID_PERMISSIONS_DIALOG_DISPLAYEDtoACTION_ANDROID_PERMISSIONSbroadcast, this field contains whether the permissions dialog was displayed or not.
1.5.0-alpha02
- Exceptions
- Removed unused exception
InternalAndroidException - Renamed
MissingPermissionsExceptiontoMissingHealthConnectPermissionsException - New Exceptions
- BadUserTimeZoneException
- UserNotDeletedException
- UserNotRegisteredException
- Removed unused exception
- Fixed documentation typos
1.5.0-alpha01
- New Permissions class
- The new
RookPermissionsManagerclass will contain an improved version of all permissions functions, follow the single permission class migration guide to successfully migrate all deprecated functions to its new implementation. - Deprecations
RookStepsPermissionsand all its functions were deprecated.RookYesterdaySyncPermissionsand all its functions were deprecated.RookHealthPermissionsManagerand all its functions were deprecated.RookStepsPermissions.isAvailable(context)was deprecated.
- The functions
requestHealthConnectPermissionsandrequestAndroidPermissionswill return aRequestPermissionsStatus. - Added broadcast Health Connect permissions, register a broadcast receiver
with
ACTION_HEALTH_CONNECT_PERMISSIONSand useEXTRA_HEALTH_CONNECT_PERMISSIONS_GRANTEDto receive granted/denied status every timerequestHealthConnectPermissionsis called. - Added broadcast Android permissions, register a broadcast receiver with
ACTION_ANDROID_PERMISSIONSand useEXTRA_ANDROID_PERMISSIONS_GRANTEDto receive granted/denied status every timerequestHealthConnectPermissionsis called.
- The new
1.4.0
What's new since 1.3.1
- Improved rookYesterdaySync behaviour when switching users.
- Improved user storage, please verify that you are following the recommended user update procedure.
- Added optional parameter
redirectUrltogetAvailableDataSourcesandpresentDataSourceViewinRookDataSourcesclass. - Logcat logging improvements.
1.4.0-alpha02
- Logcat logging improvements.
1.4.0-alpha01
- Improved rookYesterdaySync behaviour when switching users.
- Improved user storage, please verify that you are following the recommended user update procedure.
- Added optional parameter
redirectUrltogetAvailableDataSourcesandpresentDataSourceViewinRookDataSourcesclass.
1.3.1
- Optimized all data types upload process
- If a data type is not authorized, it will be counted as empty to extract only the authorized data types.
- Added
RookYesterdaySyncPermissions.shouldRequestPermissionsandRookStepsPermissions.shouldRequestPermissionsto help you decide if you should call the request permissions functions, or navigate your users to your app's settings. - Fixed Android and HealthConnect steps events datetime
1.3.0
What's new since 1.2.5
- Breaking changes
- Removed deprecated enum
HealthPermissionand all it's usages. - Removed deprecated functions
syncYesterdayEventsandsyncYesterdaySummaries.
- Removed deprecated enum
- Optimizations
- When calling
deleteUserFromRookall pending syncs will be deleted. - Modified the internal user creation process to only succeed if all data sources are registered correctly.
- Optimized Sleep Summaries upload.
- When calling
- Bug fixes
- Fixed a bug where the data sources Health Connect and Android could have different user ids assigned, from
this version all data sources will be checked after initialization and if their user ids don't match they will be
deleted (locally) and you will have to call
updateUserIDto assign the correct userID. UsinggetUserIDyou can verify the current status of the userID, more information in update userID.
- Fixed a bug where the data sources Health Connect and Android could have different user ids assigned, from
this version all data sources will be checked after initialization and if their user ids don't match they will be
deleted (locally) and you will have to call
- Health Connect
- Added
RookEventManager.syncTodayHealthConnectStepsCountto sync the steps count of the current day, if successful it will return aSyncStatusWithData.Syncedobject with the steps information that was uploaded orSyncStatusWithData.RecordsNotFoundif the SDK could not find any steps records.
- Added
- Android steps
- The background steps feature will require individual authorization, if you encounter the
exception
SDKNotAuthorizedExceptionplease contact ROOK support. - The background steps feature will send a Steps Event every hour instead of a summary every 12 hours.
RookStepsManager.observeStepsOfwas removed.RookStepsManager.getTodayStepswas removed.RookStepsManager.isActivewas renamed toRookStepsManager.isBackgroundAndroidStepsActive.RookStepsManager.startwas renamed toRookStepsManager.enableBackgroundAndroidSteps.RookStepsManager.stopwas renamed toRookStepsManager.disableBackgroundAndroidSteps.- Added
RookStepsManager.syncTodayAndroidStepsCountto sync the steps count of the current day, if successful it will return the number of steps taken.
- The background steps feature will require individual authorization, if you encounter the
exception
1.3.0-alpha02
- Optimizations
- Optimized Sleep Summaries upload.
- Bug fixes
- Fixed a bug where the error response of uploading a Steps Event was not propagated and logged correctly.
- Health Connect
RookEventManager.syncTodayStepsCountwas renamed toRookEventManager.syncTodayHealthConnectStepsCount.
- Android steps
RookStepsManager.getTodayStepsCountwas removed.- Added
RookStepsManager.syncTodayAndroidStepsCountto sync the steps count of the current day, if successful it will return the number of steps taken.
1.3.0-alpha01
- Breaking changes
- Removed deprecated enum
HealthPermissionand all it's usages. - Removed deprecated functions
syncYesterdayEventsandsyncYesterdaySummaries.
- Removed deprecated enum
- Optimizations
- When calling
deleteUserFromRookall pending syncs will be deleted. - Modified the internal user creation process to only succeed if all data sources are registered correctly.
- When calling
- Bug fixes
- Fixed a bug where the data sources Health Connect and Android could have different user ids assigned, from
this version all data sources will be checked after initialization and if their user ids don't match they will be
deleted (locally) and you will have to call
updateUserIDto assign the correct userID. UsinggetUserIDyou can verify the current status of the userID, more information in update userID.
- Fixed a bug where the data sources Health Connect and Android could have different user ids assigned, from
this version all data sources will be checked after initialization and if their user ids don't match they will be
deleted (locally) and you will have to call
- Health Connect
- Added
RookEventManager.syncTodayStepsCountto sync the steps count of the current day, if successful it will return aSyncStatusWithData.Syncedobject with the steps information that was uploaded orSyncStatusWithData.RecordsNotFoundif the SDK could not find any steps records.
- Added
- Android steps
- The background steps feature will require individual authorization, if you encounter the
exception
SDKNotAuthorizedExceptionplease contact ROOK support. - The background steps feature will send a Steps Event every hour instead of a summary every 12 hours.
RookStepsManager.observeStepsOfwas removed.RookStepsManager.isActivewas renamed toRookStepsManager.isBackgroundAndroidStepsActive.RookStepsManager.startwas renamed toRookStepsManager.enableBackgroundAndroidSteps.RookStepsManager.stopwas renamed toRookStepsManager.disableBackgroundAndroidSteps.RookStepsManager.getTodayStepswas renamed toRookStepsManager.getTodayStepsCount.
- The background steps feature will require individual authorization, if you encounter the
exception
1.2.5
- Health data extraction optimizations
- Health data upload optimizations
- Logging optimizations
1.2.4
- The functions
checkPermissions(healthPermission: HealthPermission)andlaunchPermissionsRequest(healthPermission: HealthPermission)have been deprecated in favor ofcheckPermissions()andlaunchPermissionsRequest(). These deprecated functions will be removed in a future major release (0.X.0).
1.2.3
- Improved error response of
getAvailableDataSources
Dependency updates
- io.coil-kt:coil: 2.5.0 → 2.2.2
1.2.2
- Sleep Summary sync improvements.
1.2.1
- Added
presentDataSourceViewto show a pre-built connections page.
New dependencies:
- androidx.lifecycle:lifecycle-viewmodel-ktx → 2.6.2
- androidx.activity:activity-ktx → 1.8.2
- androidx.swiperefreshlayout:swiperefreshlayout → 1.1.0
- androidx.constraintlayout:constraintlayout → 2.1.4
- com.google.android.material:material → 1.10.0
- io.coil-kt:coil → 2.5.0
1.2.0
AvailabilityStatuswas renamed toHealthConnectAvailability- Parameter
permissionof functions inRookHealthPermissionsManagerwas renamed tohealthPermission - Minor bug fixes and performance improvements
Dependency updates
- rook-transmission: 1.2.0 → REMOVED
- rook-health-connect: 1.2.0 → REMOVED
- rook-users: 1.1.0 → REMOVED
1.1.0
- If multiple sleep sessions are found when calling
RookSummaryManager.syncSleepSummaryall sessions will be synced individually. - Migrated to new ROOK SDKs api (This change is internal and does not require any change in your code).
- Added
RookDataSourcesto help developers build a custom API data sources lists, more information in Data Sources
Dependency updates
- rook-transmission: 1.1.0 → 1.2.0
- rook-health-connect: 1.1.0 → 1.2.0
1.0.0
- Moved
SyncInstructiontocom.rookmotion.rook.sdk.domain.enums.SyncInstruction - Replaced
RookStepsTrackerwithRookStepsManager - RookStepsTracker's permissions and availability functions were moved to
RookStepsPermissions. - Replaced experimental function
RookStepsTracker.observeTodayStepswithRookStepsManager.observeStepsOf
Background steps re-work
The steps feature was re-worked and is now named as "Background steps"
The background steps feature now uploads summaries of daily total steps to ROOK servers, go to Background steps documentation to see the new implementation steps.
Dependency updates
- rook-users: 1.0.1 → 1.1.0
- rook-transmission: 1.0.1 → 1.1.0
- rook-health-connect: 1.0.0 → 1.1.0
- security-crypto: 1.0.0 → 1.1.0-alpha01
0.8.1
- Fixed crash on Android 13 or lower devices when using
rookYesterdaySyncwithout having health connect installed.
Dependency updates
- rook-users: 1.0.0 → 1.0.1
- rook-transmission: 1.0.0 → 1.0.1
0.8.0
- Major performance improvements
- Added Physical events to
rookYesterdaySync - Deprecated
RookSummaryManager.syncYesterdaySummariesandRookEventManager.syncYesterdayEvents.
Automatic Sync
The following data types were added to rookYesterdaySync:
- Physical Event
If you have already implemented rookYesterdaySync this change won't require any other change in your end, after
updating to this version you will start to notice Physical events extraction and
upload logs.
Dependency updates
- rook-users: 0.7.2 → 1.0.0
- rook-transmission: 0.10.0 → 1.0.0
- rook-health-connect: 0.12.0 → 1.0.0
0.7.1
- Fixed
rookYesterdaySynccrash on Android 10 - Added Permissions and Query declarations to this SDK manifest, adding these declarations to your own manifest is optional as they will be included in the merged manifest.
0.7.0
- Renamed
SyncInstructionsupported values toNOTHING,SYNC_OLDESTandSYNC_LATEST, more information at Sync health data automatically
0.6.1
- Now you can configure the lifecycle state at which
rookYesterdaySyncis triggered using thestateparameter. - KDoc fixes
0.6.0
- Moved
com.rookmotion.rook.sdk.domain.delegate.rookYesterdaySynctocom.rookmotion.rook.sdk.framework.delegate.rookYesterdaySync - Moved
com.rookmotion.rook.sdk.domain.delegate.RookYesterdaySyncLazytocom.rookmotion.rook.sdk.framework.delegate.RookYesterdaySyncLazy - Moved and renamed
com.rookmotion.rook.tracker.StepsTrackertocom.rookmotion.rook.sdk.RookStepsTracker - Moved
com.rookmotion.rook.tracker.domain.annotation.Experimentaltocom.rookmotion.rook.sdk.domain.annotation.Experimental - Moved
com.rookmotion.rook.tracker.domain.exception.MissingAndroidPermissionsExceptiontocom.rookmotion.rook.sdk.domain.exception.MissingAndroidPermissionsException - Sync functions of
RookSummaryManagerandRookEventManagernow returnResult<SyncStatus>instead ofResult<Unit> - Rename parameter
datetolocalDateof all functions ofRookSummaryManagerandRookEventManager. shouldSyncSleepSummariesFor,shouldSyncPhysicalSummariesForandshouldSyncBodySummariesForhave been replaced byRookHelpers.shouldSyncFor()clearUserIDnow deletes the userID from preferences- Added
RequestQuotaExceededExceptionmore information at Health Connect request quota - Added
rookYesterdaySync, more information at Sync health data automatically
Dependency updates
- rook-users: 0.7.1 → 0.7.2
- rook-transmission: 0.9.1 → 0.10.0
- rook-health-connect: 0.11.1 → 0.12.0
0.5.6
- Updated rook-transmission module:
- All data types date and datetime properties will be converted to the device timezone before uploading.
0.5.5
- Improved
syncYesterdaySummariesandsyncYesterdayEventsperformance.
0.5.4
- Minor bug fixes
0.5.3
- Added
syncYesterdaySummariesandsyncYesterdayEvents. - When initializing with
initRookan attempt to autoconfigure the userID (using a previously saved userID) will be made, more information in Update userID
0.5.2
- Fixed logs when requesting StepTracker permissions.
0.5.1
- Fixed bug: Timezone always fails to sync when calling
updateUserID. - Fixed bug: Random crashes when using
requestMissingPermissions.
0.5.0
- Added StepsTracker to extract steps from phones, more information in the Steps Tracker Documentation
- When registering a user the Health Connect data source status will be changed to active.
- When requesting permissions the Health Connect data source status will be changed to active.
- Changed all
clientPasswordinstances tosecretKey. - Added
deleteUserFromRook, this function will remove a user from both server and preferences, see Removing registered users for more information.
0.4.4
- Optimized the number of calls to Health Connect required to extract Temperature Events.
0.4.0
The following functions from RookHealthPermissionsManager have been converted to static functions:
- checkAvailability(context: Context)
- registerPermissionsRequestLauncher(componentActivity: ComponentActivity)
- registerPermissionsRequestLauncher(fragment: Fragment)
- unregisterPermissionsRequestLauncher()
- launchPermissionsRequest(permissions: HealthPermission)
0.3.0
Android 14
This version will only compile against Android 14 (SDK 34). Please follow the steps to migrate
- Update your gradle version to 8.1.2
- Update your
compileSdkandtargetSdkto 34 - Update your
sourceCompatibility,targetCompatibilityandjvmTargetto Java 17
Changes
- Permissions functions have changed, see Check permissions for more information.
- Privacy policy configuration has changed, see Privacy policy for more information.
- Updated data access links, see Privacy policy for more information.
- Added new obfuscation rules, see Obfuscation for more information.
0.2.0
- Changed
setLocalLoggingLeveltoenableLocalLogs, see Logging for more information. - Added
RookEnvironmentto configure internal behaviour, see Environment for more information. - Changed
RookConfigurationconstructor parameters, see Initialize for more information. - Removed
NotAuthorizedExceptioneach rook SDK will throw a personalized message.
0.1.1
- Added Time Zone sync, see Update userID for more information.
0.1.0
- Initial release.