rook_sdk_core 4.0.0
rook_sdk_core: ^4.0.0 copied to clipboard
Core functionality for rook_sdk_health_connect, rook_sdk_samsung_health and rook_sdk_apple_health packages.
4.0.0 #
New Features #
Data Source Management (RookApiSources)
A new class, RookApiSources, has been introduced to manage third-party integrations. This class provides the
following capabilities:
- Authorization: Generate and retrieve authorization URLs for various health data sources.
- Status Tracking: Check which data sources a specific user has already authorized.
- Revocation: Revoke authorization for a specific data source.
New Data Models & Exceptions
- Data Models:
HeartRate
- Exception Types::
HealthKitOutdatedExceptionHealthKitDisabledExceptionHealthKitNotReadyExceptionMissingPermissionsExceptionRecordsNotFoundExceptionSessionExpiredExceptionUnknownException
Breaking Changes #
Centralized Exception Handling (SDKException)
Exception classes now inherit from a base SDKException and are marked as final. This structure provides a unified way
to parse errors using SDKExceptionCode.
Exception Hierarchy Changes
The following exceptions are now final and inherit from SDKException:
ConnectTimeoutExceptionDateNotValidForEventsExceptionDateNotValidForSummariesExceptionMissingConfigurationExceptionSDKNotAuthorizedExceptionSDKNotInitializedExceptionUserNotInitializedException
HttpRequestException
The HttpRequestException has been restructured to align with the new base class:
- The
codeproperty now refers to anSDKExceptionCode. - The
errorproperty has been removed. - Both the HTTP error code and the server message are now encapsulated within the
messageproperty.
Data Model Updates
To better reflect potential null values from health providers, the DailyCalories model has been updated:
| Property | Previous Type | New Type |
|---|---|---|
| basal | Double | Double? |
| active | Double | Double? |
Migrations #
The following exceptions have been removed as they are no longer thrown by the current SDK version:
BadUserTimeZoneExceptionUserNotDeletedExceptionUserNotRegisteredException
| Legacy Component | New Component |
|---|---|
MissingHealthConnectPermissionsException |
MissingPermissionsException |
MissingAndroidPermissionsException |
MissingPermissionsException |
HealthConnectNotInstalledException |
HealthKitNotInstalledException |
DeviceNotSupportedException |
HealthKitNotSupportedException |
RequestQuotaExceededException |
HealthConnectQuotaExceededException |
1.2.0 #
- Added
SleepSummary - Added
PhysicalSummary - Added
BodySummary - Added
ActivityEvent
1.1.0 #
- Added
AuthorizedDataSourceV2
1.0.0 #
- Added
DataSourceAuthorizer AuthorizedDataSourcesproperties have been changed to nullable in order to show data source availability.- Added Dexcom to
AuthorizedDataSourcesproperties.
- Added Dexcom to
0.4.5 #
- Added
DailyCalories - Added equals and hashCode implementation to
data_source,rook_configurationandauthorized_data_sources.
0.4.4 #
- Added
AuthorizedDataSources
0.4.3 #
- Deprecated property
imageinDataSource, replace withimageUrl.
0.4.1 #
- Added DataSourceType
0.4.0 #
- Added BadUserTimeZoneException.
- Added DateNotValidForEventsException.
- Added DateNotValidForSummariesException.
- Added UserNotDeletedException.
- Added UserNotRegisteredException.
- MissingPermissionsException was renamed to MissingHealthConnectPermissionsException.
- HttpRequestException
messageproperty was renamed toerror. - Changed HttpRequestException constructor parameters order to
HttpRequestException(code, error).
0.3.1 #
- Added RequestPermissionsStatus.
0.3.0 #
- Added
enableBackgroundSyncto RookConfiguration. - RookConfiguration parameters were changed to required named parameters.
0.2.1 #
- Added SyncStatus and SyncStatusWithData.
0.2.0 #
- Renamed NotAuthorizedException to SDKNotAuthorizedException.
0.1.2 #
- Added DataSource class.
0.1.0 #
- Changed all instances of clientPassword to secretKey.
0.0.2 #
- Added RookEnvironment.
0.0.1 #
- First release.