How to Enable Google Fit, Apple’s HealthKit, and Other Services to Share Data with Your App

Published: December 15, 2023

21 min read

If you’re building a fitness application of any kind, you likely know that they greatly depend on real-time user data. That is true no matter what your case is: gym scheduling, online workouts, branded coaching, mindfulness, nutrition, etc. But what’s the use case for it?

Modern health and fitness app users often have more than 1 workout data tracking application. They can use their favorite wellness apps, including those developed to track mental health, to monitor sleep data, count calories burned and taken in, and track evening runs, each perfectly calibrated to match their preferences and needs.

Google and Apple let such apps freely exchange data — of course, prior user permission is required. It helps to give users an even more customized experience than any of these apps could do on their own.

Modern fitness apps can provide you with a huge amount of user data

Modern fitness apps can provide you with a huge amount of user data (image by Sajon)

For example, your online health and fitness app can analyze the daily calorie intake of your clients to offer even more personalized exercise plans. Alternatively, your users can compete in a daily step-counting challenge in the same social fitness app while using different devices and apps for activity tracking.

Read Also

How СOVID-19 Impacts Fitness Industry Transformation

Whatever your reasons are, you will still encounter the same questions like:

  • What data do fitness trackers and apps collect?
  • How can you enable Google Fit, Apple’s HealthKit, Garmin, Strava, Fitbit, and other services to share data with your application?
  • Are there any special privacy, security, or other requirements you need to oblige in order to fulfil to integrate these services into your app?

In this guide, we’ll cover all of the already mentioned, as well as some other questions like comparing Google Fit kit vs Apple Health Integration. Let’s start by figuring out the general scheme of how you can integrate these services into your app.

📲 How to Get Fitness & Health Data for Your App from other Apps?

For non-developers

If you're a gym and yoga studio owner, personal coaches, or fitness influencers who has little background in the tech industry, let’s dedicate some time to talking about how third-party app features integration works from the technical point of view.

To access fitness & health data provided by such services as Google Fit, Apple Health, Garmin, and others, you’ll need to integrate their public API — application programming interface. To put it simply: write a special part of code that will enable your app to reach out to those services, ask them for data and display it in your application.

In the description of each service, we’ve left links to the service’s documentation that explains what your developers should do. So just show it to your development team if you already have one — and they’ll be all set!

In case you’re still looking for a Tech Partner, drop us a line with your idea and we’ll be glad to see how we can apply our experience to help you!

For developers

Links to the documentation can be found in paragraphs dedicated to each service 🙂


Let’s start by taking a look at two major fitness & health data services — Google Fit and Apple Health!

🏃‍♂️ Google Fit

Google Fit was released in 2014. The same year the company also introduced the Google Fit SDK to provide developers with tools for mobile and web app development.

Actually, there are quite many fitness apps using Google API. The most well-known are Nike Run Club, Strava, Runtastic, 8fit Workouts, Calorie Counter — MyFitnessPal, and others.

What’s even more interesting is that the list of Google Fit compatible apps isn’t only limited to fitness applications. For example, you can find such apps as Pokémon Go (game), Calm (mindfulness), or Clue Period Tracker (women’s reproductive and overall health).

Read Also

How to Make a Meditation App Like Headspace or Calm?

This is how it all works:

The list of Google Fit compatible devices is also quite long. Moreover, it’s the default fitness and health app in every Wear OS device. That shows that Google Fit can be perfectly integrated with devices like Amzfit, Xiaomi Mi Band, Samsung Galaxy Watch, Huawei Band, Sony SmartBand, Withings Move, Fitbit, and Garmin devices.

Many app developers are interested in Google Fit integration because of the great number of available data types. Let’s take a closer look at them!

Ecosystem

Google Fit is an open ecosystem. That means that users can upload their workout data to a central storage (repository) and then access it from different applications and devices.

To develop a mobile or web health app that works with Google Fit, you need to connect Google Fit SDK to your app. It comes together with a bunch of Android APIs like the Sensors API (to access raw sensor data streams), the History API (to access the historical health and wellness data), or others.

For iOS and web applications, you should use the REST API.

Types of fitness & healthcare data

Basically, Google Fit collects and stores 4 types of fitness data from users:

  1. Activity & Exercise — step count, burned calories, workout duration, basal metabolic rate, steep data.
  2. Location — total running/cycling distance and speed as well as cycling cadence (RPM).
  3. Body — heart rate, weight, body fat percentage.
  4. Nutrition — food & hydration.
Google Fit can provide your app with different types of data: calories, steps, activity, etc. (*image by [Ellen Chen](https://dribbble.com/ellencc)

Google Fit can provide your app with different types of data: calories, steps, activity, etc. (image by Ellen Chen)

Your app can access this data by asking permission to do so. Except for that public data, Google Fit can also store restricted health data types. However, since these kinds of data relate to sensitive healthcare information, you’ll have to apply for OAuth API verification to get it. Then, Google will review your application and either grant or deny verification. Such protected info includes:

  • Oxygen saturation
  • Body temperature
  • Blood pressure
  • Blood glucose
  • Cervical position and others

If you need data that isn’t covered by the platform yet, Google allows creating custom data types.

Requirements

Since health and fitness data is usually quite sensitive, you should also be aware of how Google Fitness APIs comply with modern security requirements and how you integrate them without breaking these rules.

The full Terms and Conditions can be found here, so we’ll just cover the key points:

  • If you use Shareable Data Types from other providers, you may be required to comply with additional third-party terms. For example, if you’d like to use any custom fitness data (e.g., NIKEFUEL fitness points) in your app, you must comply with the terms of the provider (the NIKE+ Developer Terms in that case).
  • Google Fit isn't meant to be used with medical devices. As Google explicitly states it, "do not use Google Fit APIs with any product or service that may qualify as a medical device" as it defined in the Section 201(h) of the Federal Food Drug & Cosmetic (FD&C) Act.
  • Using Google Fit APIs doesn't automatically make your app HIPAA-compliant. That means that you are solely responsible for any applicable compliance with HIPAA. Moreover, if you plan to involve any kind of Protected Health Information (according to HIPAA), you’ll need to get prior written consent from Google to use such.
  • Finally, you have to agree that you will neither sell any content you get from Google Fit for advertising, promotions, etc., nor allow your end-users to do so.

Integration

To enable Google Fit to share data with your app, you’ll need a Google account and Google Play Services. Good news for your developers: Google provides clear and extensive documentation on how to retrieve data from Google Fitness API! Let them check it below:

  • Android APIs for developing Android apps
  • REST API for developing apps on any other platform (including desktop web)

Now, let’s switch to Apple’s healthcare data framework and check the differences between HealthKit and Google Fit!

🧘‍♀️ Apple’s HealthKit

Just like Google Fit, the Apple Health app was announced in 2014 and included in Apple devices with iOS 8+. Quite a fruitful year for fitness apps, isn’t it?

Along with the app, the company also released the Apple HealthKit API, which is a part of the iOS SDK for app development on Mac.

The tool became popular really quickly. The list of apps compatible with HealthKit includes such popular names as:

  • fitness apps — Strava, Runtastic Steps, Garmin Connect
  • nutrition apps — Lifesum, Foodzy
  • healthcare apps — HealthyNow, Hello Doctor
Many apps rely on Apple's HealthKit as their main fitness data provider

Many apps rely on Apple's HealthKit as their main fitness data provider (image by Ann Negrebetskaya)

When it comes to HealthKit compatible devices, Apple obviously prioritizes its own products — iPhone, iPod Touch, and Apple Watch. Except for that, Apple Health works with Jawbone, Nike Fuelband, devices by Withings, and a bunch of others. However, since both Apple and Google may face changes in the number and brands of supported devices, we recommend checking this information before developing your own, so as to be aware of the latest changes.

When you build a healthcare app, the iOS HealthKit framework is a valuable tool, as it is widely used in different types of apps and collects a vast array of data.

Ecosystem

Apple offers a total of 3 Kits that developers can use:

  • HealthKit — a health & fitness data container. It enables seamless communication with other apps and makes it easy for them to store, exchange, and collect health data.
  • ResearchKit — this framework is useful if you need to gather medical data from large groups of people for research purposes.
  • CareKit — a framework for monitoring and managing long-term and chronic illnesses, recovery after surgery, etc.

We’ll focus on the Apple HealthKit SDK since it’s the one you’d need if you are interested in fitness or yoga application development services.

Read Also

How to Make an Own Yoga app like Asana Rebel?

Types of fitness & healthcare data

If we do Google FitKit vs Apple HealthKit comparison, the second one collects more data on users than its competitor. Furthermore, the app puts a special emphasis on health data.

From the fitness perspective, especially when considering how to create a female health tracking app, the most important categories in Apple HealthKit include:

🗂 Category

🔎 Data examples*

Characteristic Identifiers — data that doesn’t typically change over time

Sex, blood type, date of birth, etc.

Activity & Exercise

Number of steps, distance ran/walked/cycled/skied, number of excercise repetitions; calories burned.

Body Measurements

Height, weight, body mass index, and body fat percentage.

Vital Signs

Heart rate data, oxygen saturation, body temperature, respiratory rate, systolic, and diastolic blood pressure.

Nutrition

Amount of consumed energy, fiber, sugar, carbohydrates, fat, etc.; vitamin and mineral consumption; hydration levels.

Mindfulness and Sleep

Sleep analysis

Workouts

Workout type identifier and the routes the user takes during workouts.

Other types of data that mainly relate to health data

Reproductive health, hearing, medical symptoms, lab and test results, clinical records, UV exposure.

** full list of examples can be found here*

How does the Health app collect such data? It’s provided either by:

  • devices (for example, iPhone or Apple Watch may count the number of steps taken and calories burned);
  • apps (user has their own favorite hydration app that shares this data with Apple Health);
  • the user themselves (when they manually enter their weight).

Note that developers aren’t allowed to create custom data types. So, if you decide to connect Apple Health framework to your app, make sure that it provides all the types of data you need. Otherwise, we’d recommend you to consider using another fitness data service that either provides all the required data types or allows you to create custom ones — like Google Fit API.

When developing fitness apps that work with Apple Health you can enable them to access and read the data as well as save new data to HealthKit.

Requirements

Apple has quite strict guidelines for developers that want to enable data exchange using the Apple Healthkit SDK. Here are the key things to consider:

  • You must get explicit permission from a user to read and write their data. It might be heart rate, running or workout data, blood pressure - you need their permission. Moreover, users can grant or deny their permission for each type of data: for example, they may grant permission to share their blood pressure and heart rate after any form of exercise but prevent your app from accessing any nutrition data.
  • Data must be kept only on users’ devices.
  • You can only access the Apple HealthKit APIs if your app is primarily designed to provide fitness or health services. How can you prove this to Apple? As they put it in their guidelines, “it must be clear in both your marketing text and your user interface”.
  • Obviously, you can’t disclose any information gathered via the Apple HealthKit framework for advertising. That indicated that you can still run in-app ads but not use health & fitness data for that purpose. Also, Apple allows sharing this information with third parties but only with user permission and only if the third parties also provide fitness or health services (for example, yoga classes) to the user.
  • Finally, you must have a coherent and clear privacy policy. Additionally, you should provide a URL during the app submission process, so that users can easily find and check it out on the App Store page of your fitness or health app.

You can find more details on user privacy on the official pages of the iOS HealthKit framework: Protecting User Privacy and HealthKit Interface Guidelines.

Integration

Apple has a comprehensive step-by-step guide for iOS developers. Note that you can only integrate HealthKit into iOS applications.

For that, however, your Development Team will need to use iOS SDK 8 or higher. The guide for that can be found here.

🏄‍♀️ Garmin

Garmin is one of Apple’s and Fitbit’s key competitors on the market of fitness wearable devices. With millions of users, Garmin also represents a huge database of fitness data that you can access from your fitness app, too.

That has been proven by the number of third-party fitness apps and websites that have partnered with Garmin for facilitated data exchange. To name a few big names: Nike+, Strava, MyFitnessPal, Run Keeper, and others.

You can combine your and service's data. For example, develop your own nutrition app and stream workout data from Garmin to show an accurate daily calorie balance

You can combine your and service's data. For example, develop your own nutrition app and stream workout data from Garmin to show an accurate daily calorie balance (image by Ariel Verber)

Read Also

How to Build a Diet or Nutrition App?

The good news is that you can access the Garmin framework to enable fitness data sharing too. But first, let’s take a look at the opportunities that Garmin offers to developers!

Ecosystem

Garmin has a bunch of APIs and SDKs to cover different cases of fitness data exchange. Let’s see what tools you can use for Garmin integration.

Connect IQ

The Garmin SDK allows building applications, widgets, data fields and watch faces for Garmin devices. That can come in handy if your users actively use smartwatches and fitness trackers by Garmin and you’d like to improve their experience with your custom software.

Training API

Garmin’s API lets users share their training data (like workout & training plans, running route plans, etc.) from your platform to the Garmin Connect account, and from there — to Garmin devices. Thus, users are able to access and track this data from their Garmin devices during workouts.

In other words, the Training API expands the utility of your content. For example, users can follow your workouts or running routes on their Garmin wearables, increasing the likelihood of program adherence.


However, the key elements of the ecosystem are Garmin Health API and SDKs. These are the ones you’ll likely use when you need to enable data streaming from Garmin wearables or Garmin Connect.

Garmin Health SDKs

Garmin Health enterprise partners can use the Garmin Health SDKs for direct integration with Garmin wearable devices in their iOS and Android applications. In other words, these SDKs might come in handy if you need to get user data like heart rate from Garmin wearables into for own fitness app directly.

Read Also

What to Consider when Integrating Bluetooth Low Energy Devices in your React Native App

The company offers 2 different types of SDKs:

  • The Standard SDK

The HIPAA-compliant SDK allows gathering and storing users’ exercise & health data (e. g. blood pressure during a workout) from Garmin wearables in your app. With its help you can create a single-app experience, take control of device features, and ensure that data goes directly to your app, letting you avoid the use of any Garmin servers.

  • The Companion SDK

This SDK provides fewer data types but allows real-time activity data streaming from Garmin wearables. For example, step count, heart rate, accelerometer, etc. However, the SDK itself doesn’t let you access historic data. To read episodic and historic data that users share with the Garmin Connect service, you should combine this Garmin SDK with the Health API.

Standard SDK

Companion SDK

Supported Devices

vívofit® 3/4, vívosmart® 3/4, vívoactive® 3/4, vívomove® HR/3, vívosport®, Venu™, Forerunner® series, fēnix® 5 series, fēnix® 6 series, Instinct®, tactix® Charlie, MARQ®*

vívosmart® 3/4, vívoactive® 3/4, vívomove® HR/3, vívosport®, Venu™, Forerunner® series, fēnix® 5 series, fēnix® 6 series, Instinct®, tactix® Charlie, MARQ®

Number of supported data types

14

10

Real-Time Data

Compatible with Garmin Connect

Finally, it’s likely that you’ll need to access your users’ fitness & health data stored in Garmin Connect at some point. That’s when you’ll need the Garmin Health API.

Garmin Health API

If you need access to all of the data synced through Garmin Connect, the Health API should be your choice. It doesn’t allow you to control or configure Garmin devices but does share the fullest volume of data they gather with your app.

Types of fitness & healthcare data

The Garmin Health API lets you read and use both the all-day health data as well as details of fitness activities. Thus, it’s the only API you need to integrate so as to read data provided to Garmin by users.

Here you can see the types of supported data:

Data types supported by Garmin API

Data types supported by Garmin API

However, you can customize your data feed and read only those metrics that are essential for your app, leaving out the unnecessary ones.

The list of supported activity types is also huge and includes over 30 names. Except for basic running/cycling/swimming activities, Garmin also provides data on such special sports like kitesurfing, snowboarding, and others.

Requirements

Garmin’s Privacy Policy and Agreement are available only for those who have requested and been granted access to the company’s API and SDKs.

However, as of 2019, it included common security requirements:

  • You are allowed to transmit and share any end-user data only with the fully informed consent of the end-user.
  • It’s prohibited to sell or rent data you get using Garmin’s API or SDKs.

However, it also included a number of special responsibilities such as:

  • If you’re going to change the location or URL of your privacy policy, you must first get Garmin’s written consent at least 30 days prior to the change.
  • If you’d like to mention Garmin for any marketing purposes, you must first obtain written approval.

Integration

Garmin provides access to its framework upon request. Usually, the request is processed within 2 business days. The approval grants you access to the Garmin Developer Portal.

They also hold an integration call to better understand your needs and help with high-level technical details. Typically, integration takes 1-3 weeks. Typically, integration takes 1-3 weeks.

You can send your request here:

Garmin Health SDKs Overview | Garmin Health API Overview

🚴‍♂️ Fitbit

Enabling Fitbit to share data from 20+ million users opens your way to one of the biggest fitness data storages. Additionally, with comprehensive documentation, the development becomes a “piece of cake.”

Just like Garmin, Fitbit integration allows creating your own apps for Fitbit wearable devices and integrating user data into your desktop or mobile applications. Here are APIs and SDKs you should use for that purpose.

You can track different types of activities with Fitbit (*image by [Andrej Roman](https://dribbble.com/andrej-roman){ rel="nofollow" .default-md}*)

You can track different types of activities with Fitbit (image by Andrej Roman)

Ecosystem

Fitbit provides developers with everything they need to either build an app for a Fitbit device or integrate the data of Fitbit users into their own application.

The most relevant parts of the Fitbit framework for you are:

  • the Fitbit SDK — to create clock faces and applications for Fitbit OS devices: Fitbit Ionic and Versa Series (Versa, Versa Lite, Versa 2).
  • the Fitbit Web API — to enrich your mobile or desktop applications with data from Fitbit wearables, Aria scale, and manually entered logs.

In case you want to build an app for Fitbit devices, your developers will also use Fitbit Studio — a web browser-based development environment.

However, since this article is covering the topic of custom fitness/health app development, we’ll focus on the characteristics of the Fitbit API, too.

Types of fitness & healthcare data

Fitbit divides the data it provides into categories called “scopes”. Developers can access 9 of them:

🗂 Scope

📋 Description

Activity & Exercise

Exercise and activity data logging, including details such as step count, calories burned, distance, active minutes

Heart Rate

User’s heart rate and related analysis

Location

GPS and other location data

Nutrition

Food/water logging, nutrition-related data, calorie consumption, goals, etc.

Sleep

Sleep logs and related analysis

Weight

Weight, goals and related analysis (body fat percentage, body mass index)

Social

Social activity of the user within the Fitbit platform: friend list, leaderboards, etc.

Profile

Basic user info like name, sex, and age

Settings

User account and device settings (e.g. alarms)

Requirements

At first sight, the security requirements for the Fitbit framework integration may seem quite basic: you can’t read any data without the user’s permission; you can’t sell the data obtained through the Fitbit services; users should clearly understand how you use their data, etc.

Nevertheless, we recommend taking a closer look at Fitbit’s requirements since the platform is quite strict when it comes to using their data in your own app.

For example, when providing access to their services, Fitbit expects developers to create apps that “interact with, enhance, extend, and improve the Fitbit Platform.” They specifically emphasize that you shouldn’t use the Web API or Fitbit Developer Tools to create services that replace or provide similar functionality to the Fitbit Products and Platform. Make sure to consider this if you are thinking about making a Fitbit-like application.

Fitbit has quite strict terms of service so study them carefully (*image by [Matt Anderson](https://dribbble.com/mattandersondesign){ rel="nofollow" .default-md}*)

Fitbit has quite strict terms of service so study them carefully (image by Matt Anderson)

You should also be careful with details. For example, your app, business name, domain name, and even email address or social media username can’t contain not only the name “Fitbit” itself but also the “-bit” ending. You are also not allowed to use their logo, icon, and even fonts from any Fitbit Products.

You can check all the needed policies and requirements here:

Integration

To connect Fitbit SDK and develop apps and clock faces for Fitbit devices, you’ll need:

  • A Fitbit user account.
  • A Fitbit OS device for testing. It’s not mandatory to buy one — you can use the Fitbit OS Simulator for Windows or macOS instead.
  • The latest Fitbit mobile app for iOS, Android, or Windows Phone, paired with a Fitbit device.
  • A computer with access to the Fitbit Studio.
  • An internet connection for the Fitbit device.

Look for all the details here:

Fitbit SDK | Fitbit Web API

🏂 Strava

Strava is another popular fitness platform that can be a source of valuable health & workout data for you. However, the company is also quite strict on how you use that data, so they expect your application to augment the Strava user experience in the first place.

Nevertheless, the Strava API is used by many big names such as Fitbit, Peloton, or Aaptiv. The company is actually really proud of the number of apps integrated with them, so you can find many cases on this list.

By the way, one of the projects we’ve worked on is featured on that list under the wellness category — look for WePulse. Closer to the end of this article we'll share our expertise using that case!

Strava expects your app to improve the Strava experience of users in the first place

Strava expects your app to improve the Strava experience of users in the first place (image by Angelina Skiba)

Ecosystem

Unlike other services in this article, Strava doesn’t have a branched ecosystem. It relies on the Strava API. This is the only tool developers really need; the company doesn’t offer any Strava SDK or other tools.

The Strava API is a free-to-use public interface that allows you to access the Strava data on users, routes, clubs, gear, and segments. Notice that the API usage is limited to a 15-minute long, daily request basis on the app. The default rate limits your app to 100 requests every 15 minutes, with up to 1,000 requests a day.

Read Also

How To Build a Workout Streaming App Like Peloton?

Types of fitness & healthcare data

With the Strava API you can access the following types of data:

🗂 Data Type

📋 Data examples (not exclusive list)

Activity & Exercise

Type, distance, time, average speed

Athlete

Name, profile picture, weight, city, country, sex, friend count, linked clubs/bikes/shoes

Club

Name, city, country, status (private or not), member count

Gear

Name, brand, model, description, logged distance

Route

Distance, type (for runs or rides), status (private or public), estimated time to complete

Running Race

Name, type, distance, start time, country and city

Segments

Distance, grade, elevation, city, country

Streams

Time, distance, altitude, heart rate, cadence, power, temperature

Strava doesn’t have all these data types listed in one place, but you can check this page for more info.

Requirements

Strava’s guidelines are somewhat similar to the ones Fitbit has. Except for basic security requirements, you are not allowed to create an app that replicates or competes with Strava.

However, the company also has a few special requirements. For example:

  • You must use the provided Strava logos and links in places where you use data provided by Strava.
  • Your app must include the button that allows users to connect strava.
  • You must also include the “Compatible with Strava” or “Powered by Strava” logos on all websites, applications, and media (prints, videos, images).

To make sure your app matches all the requirements for Strava integration, check the following links:

Integration

All the info on integration can be found in the Getting Started Guide and Strava API Documentation.

🦸‍♂️ Our Expertise in Health and Fitness Data Sharing Implementation

At Stormotion, we have also implemented fitness data integration from third-party services into our clients’ apps. One of the projects we’ve worked on, WePulse, is even featured on the Strava website.

WePulse is a French corporate well-being platform aimed to motivate employees across Europe to adopt a healthier lifestyle. The company has over 85 000 signed up employees and 150 partners, including BNP Paribas, Go Sport, and the city of Paris.

We started working on their project when our other client, a German corporate health platform HUMANOO, acquired WePulse.

Humanoo-wePulse

Then the HUMANOO Team asked us to continue the BackEnd development for the WePulse mobile app.

To get health & fitness user data, we implemented integration with 3 fitness services for them:

  • Runtastic
  • Suunto
  • Withings

Thus, they are able to get all the fitness data without counting steps, calories, and other well-being parameters on their own.

💡 Takeaways

These were the top 5 apps that gather fitness & health user data. We took a look at 2 main services, Google Fit and Apple Health, and followed by reviewing big industry players such as Garmin, Fitbit, and Strava.

Except for these companies, fitness data sharing can be also provided by:

We at Stormotion fitness app development company can help you integrate any of the mentioned or other fitness & health data services. We are also here to answer any questions on fitness/yoga app development — reach out to us and we’ll see how we can help you! 🙂

Help Me with My Fitness App Development!

Read also

How can we help you?

Our clients say

Stormotion client Alexander Wolff, CPO from [object Object]

When I was working with Stormotion, I forgot they were an external agency. They put such effort into my product it might as well have been their own. I’ve never worked with such a client-focused company before.

Alexander Wolff, CPO

Sjut