Skip to main content

Step 1: Create a Spike Connection

To set up the Spike SDK create SpikeConnectionV3 instance with your Spike application id, application user id and signature unique to each of your application 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:
Please note that you need to call requestHealthPermissions each time users restart their app after making Spike Create Connection.

Step 3: Get Data

The maximum permitted query date range on Android Health Connect is 90 days
There are four types of data you can retrieve from Spike:
  • Statistics are calculated values derived from records.
  • Activities are data about a user’s activities or workouts.
  • Sleep is data about a 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:
where:

Records

where: