Spike SDK Usage
Step 1: Create Spike connection
To set up the Spike SDK createSpikeConnectionV3
instance with your Spike application id, application user id and signature unique to
each of your apllication users (more on generating signatures here):
Step 2: Ask user for permissions
If you plan to use Android Health Connect and/or Apple HealthKit data providers you should first get users permission to use their data:Step 3: Get data
The maximum permitted date range on Android Health Connect is 90 days
- Statistics are calculated values derived from records.
- Activities are data about user’s activities or workouts.
- Sleep is data about user’s sleep.
- Records consist of the raw data points collected from user devices or applications.
Statistics
Now you can read hourly statistics data of steps and distance for today:Records
Additional information
ThespikeConnection.getUserInfo()
call will only show that Apple HealthKit, Android Health Connect, or Samsung Health Data is enabled after you have successfully retrieved data at least once using functions like getStatistics()
, getRecords()
, or similar data retrieval methods.