SpikeConnectionV3 class
Methods
checkHealthConnectAvailability ()
→ Future <HealthConnectAvailabilityStatus >
Check if Health Connect is installed or should be updated.
checkSamsungHealthDataAvailability ()
→ Future <SamsungHealthAvailability >
Check if Samsung Health Data is available on the device.
close ()
→ Future <void >
disableBackgroundDelivery ()
→ Future <bool >
Disables background checks for new data.
disableHealthConnectIntegration ()
→ Future <void >
Disables Health Connect as a data provider for SpikeSDK.
After this call SpikeSDK will stop asking for Health Connect data and will provide only data
from other providers or data that was already gathered.
disableHealthKitIntegration ()
→ Future <void >
Disables HealthKit as a data provider for SpikeSDK.
After this call SpikeSDK will stop asking for HealthKit data and will provide only data
from other providers or data that was already gathered.
disableSamsungHealthDataIntegration ()
→ Future <void >
Disables Samsung Health Data as a data provider for SpikeSDK.
After this call SpikeSDK will stop asking for Samsung Health Data.
enableBackgroundDelivery ({List <StatisticsType > ? statisticTypes , List <MetricType > ? metricTypes , List <ActivityConfig > ? activityConfigs , List <SleepConfig > ? sleepConfigs , bool ? includeEnhancedPermissions })
→ Future <bool >
Enable background checks for new data from Health Connect / HealthKit / Samsung Health Data.
Which providers will be used depends on the ones that are enabled.
enableHealthConnectIntegration ()
→ Future <void >
Enables Health Connect as a data provider for SpikeSDK
enableSamsungHealthDataIntegration ()
→ Future <void >
Enables Samsung Health Data as a data provider for SpikeSDK
getActivities ({required ActivityConfig config , required DateTime from , required DateTime to , StatisticsFilter ? filter })
→ Future <List <Record > >
Retrieves all activities based on the specified configuration.
getBackgroundDeliveryConfig ()
→ Future <BackgroundDeliveryConfig ? >
Get current background delivery config or null if it's disabled.
getGrantedSamsungHealthDataPermissions ()
→ Future <List <String > >
List all Samsung Health Data permissions already granted by user
getIntegrationInitUrl ({required Provider provider , IntegrationInitConfig ? config })
→ Future <String >
Returns the URL string required to initiate integration with the provider.
getRecords ({required List <MetricType > ofTypes , required DateTime from , required DateTime to , StatisticsFilter ? filter })
→ Future <List <Record > >
Retrieves all records based on the specified configuration.
getSleep ({required SleepConfig config , required DateTime from , required DateTime to , StatisticsFilter ? filter })
→ Future <List <Record > >
Retrieves all sleep records based on the specified configuration.
getStatistics ({required List <StatisticsType > ofTypes , required DateTime from , required DateTime to , required StatisticsInterval interval , StatisticsFilter ? filter })
→ Future <List <Statistic > >
Retrieves all statistics based on the specified configuration.
getUserInfo ()
→ Future <UserInfoResponse >
Get information about current user, the most important of which is the list of provider
integrations.
getUserProperties ({required List <MetricType > ofTypes })
→ Future <UserProperties >
Get personal body measurements of user as weight, height, birth date, gender, etc.
isHealthConnectFeatureAvailable (HealthConnectFeature feature )
→ Future <bool >
Check if a specific Health Connect feature is available on the device.
isHealthConnectIntegrationEnabled ()
→ Future <bool >
Check if Health Connect integration in SpikeSDK is active or not
isHealthKitIntegrationEnabled ()
→ Future <bool >
Check if HealthKit integration in SpikeSDK is active or not
isSamsungHealthDataIntegrationEnabled ()
→ Future <bool >
Check if Samsung Health Data integration in SpikeSDK is active or not
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openHealthConnectInstallation ()
→ Future <void >
Opens Health Connect installation
requestHealthPermissions ({List <StatisticsType > ? statisticTypes , List <MetricType > ? metricTypes , List <ActivityConfig > ? activityConfigs , List <SleepConfig > ? sleepConfigs , bool ? includeEnhancedPermissions , bool ? includeBackgroundDelivery })
→ Future <bool >
iOS:
This method must be called before requesting any data from HealthKit. If the user has not
granted permissions to read HealthKit data, a system-generated dialog will appear listing the
required permissions. If the user has already granted or denied permissions, no dialog will be shown.
To read data from HealthKit, this should be run after each app start (but it is NOT needed when
the app returns from the background).
requestSamsungHealthDataPermissions ({List <StatisticsType > ? statisticTypes , List <MetricType > ? metricTypes , List <ActivityConfig > ? activityConfigs , List <SleepConfig > ? sleepConfigs })
→ Future <List <String > >
Initiates the permission request flow with Samsung Health Data.
This function will check for existing permissions and, if necessary,
prompt the user to grant access to the required permissions.
revokeAllPermissions ()
→ Future <void >
Revoke all Health Connect permissions granted by the user
toString ()
→ String
A string representation of this object.
inherited
spike_flutter_sdk 4.3.124