How Apple’s HealthKit and Google Fit APIs Help in Health and Fitness Apps Development

By: Tanya Kobzar

healthcare / mobile development

3.08.2022

smartwatch health tracker

The safest investments within digital healthcare are those placed in innovations that deliver results: positive clinical outcomes or new findings. Only data-driven technologies can boost these changes. 

 

With the release of 5G tech, patients’ data — one of the foundations for making more accurate diagnoses and devising personalized, highly efficient treatment — is often gathered via wearables. More and more patients agree to share info about their vitals and other biomarkers with clinics or health and wellness organizations — partially because the pandemic made all of us think about how to keep ourselves safe & healthy, and data helps us understand how to do it. 

 

In this article, we’re going to talk about two tools that help businesses and developers tap into users’ health data and create more solutions for better patient health: Apple HealthKit and Google Fit APIs (application programming interfaces). We’ll touch on the application of those across the healthcare and fitness industries, discuss their advantages, and present a small overview of how they work. We’ll also talk about one of our projects that utilized one of those and go through challenges all companies that work with patients’ private data face (and how to overcome them). 

What Google Fit and Apple’s HealthKit Are & How They Work 

To start, let’s briefly talk about what these technologies are. 

 

Google Fit. It’s a fitness tracking platform that was released in October 2014. It is an open ecosystem that currently supports Android 4.1 and higher. It reads, gathers, and stores users’ data obtained via wearable gadgets and self-reporting. 

Using Google Fit SDK, developers can build an app that requests access to the data Google Fit collects and keeps in the cloud via Fit APIs. When a user agrees to share, new apps can display and utilize the chosen data. For instance, if Google Fit is connected to a Fitbit bracelet that collects info about a person’s real-time activity and stress levels, your newly-built app can receive a stream of these data via Fit APIs — if a user allows it.  

Now, Fit APIs — “bridges” that connect a source of users’ data with Google Fit and third-party apps that receive access to Google Fit — are called Android Fit APIs and Google Fit REST APIs. The first is used to build mobile apps, and the second — to build enterprise solutions. Throughout the article, we’ll call them Fit APIs or Google Fit APIs.  

 

HealthKit. Apple has an app called Health (an analog of Google Fit) that collects and visualizes user data that was received by the Apple Watch and self-reported. It was released in 2014 for iPhone with iOS 8+. HealthKit is a framework with an API that allows displaying the health data collected by apps and wearables that are connected to Health. In the same fashion, developers should design consent forms to ask users to share their data collected in the Health app or through Apple Watch via HealthKit. 

 

So, both Google Fit and HealthKit: 

  • Gather all health data a device has access to and display it; 
  • Offer users an opportunity to view, edit, and delete their health data and share it with other solutions; 
  • Unite all user data under a standardized format. 

Their differences:

  • Google Fit works with any platform, whereas Health is an iOS-only app (therefore, data from Health, specifically, is for iOS devices only). 
  • Google Fit APIs are meant for creating fitness apps and should not be used for creating clinical solutions. Google Fit cannot be used with medical devices or as a digital therapeutic. HealthKit is built to help develop digital therapeutics — apps that can be used for patients’ treatment. 
  • Google Fit stores data in the cloud, whereas Health and HealthKit save it on the user’s device. 

Now, knowing that HealthKit and Google Fit APIs help businesses gain access to and use the health data gained from users for building digital products, let’s see what benefits they bring.  

Benefits of Apple’s HealthKit and Google Fit APIs

Businesses that use technologies developed with these two would:

 

Cut development time & save costs. That works both for B2B vendors who build solutions for the healthcare and wellness industry and for those who use these solutions within these domains. Hardware startups, for instance, don’t need to build the functionality that would connect to Fitbit or Apple Watch for an app to utilize their sensors. They simply need to connect their solution to Fit APIs and HealthKit that are granted access to data from Fitbit and Apple Watch. 

 

Help doctors make data-driven decisions. Users’ data is valuable. Whatever audience you’re building a solution for, they would benefit from data analytics that can be built based on data transferred through the APIs of these two tools. For instance, it would be useful for startups that build solutions for patient monitoring and ventures that work within behavioral health — helping users change their habits, thinking, etc. Data can be processed and analyzed via machine learning tools within your solution. That can bring insights into patients’ conditions and dynamics of treatments and help clinicians design better care strategies.  

 

Deliver better health outcomes. If doctors could receive the insights from a patient’s app and smart devices, they would have a more comprehensive and rich picture of a person’s condition and have more data to develop ideas of how to help them. That cuts away a lot of guesswork and trial-and-error and allows doctors to focus on providing and facilitating personalized services that lead to better health. 

watch for health tracking

End-users of healthcare and fitness apps would benefit from seeing the health data organized and used for improving their well-being. Apart from that, control over access to their medical data means users can bring their medical history wherever they go — that makes receiving medical care easier. 

 

Software developers — besides benefiting from working faster — would be able to somewhat solve the issue of interoperability within healthcare and fitness projects. Google Fit has a range of fitness devices and wearables it can be easily connected to, which means a pull of data related to exercises, nutrition, and a person’s general well-being can be displayed in fitness apps. 

 

Let’s move to what data exactly HealthKit and GoogleFit can gather for you to figure out how different apps might benefit from them. 

Data Types Apple HealthKit and Google Fit APIs Work With

We’ve already mentioned that while Google Fit focuses on fitness-related data, HealthKit gathers a wider spectrum of health information. 

 

These data sets overlap a lot, so: both tools can collect data about

 

  • Body measurements (weight, height, etc.) 
  • Physical activity (steps, duration of exercises) 
  • Nutrition
  • Sleep
  • Location 
  • Heart rate 

 

With Google only entering the space of tracking health data with their new tool called Android API Health Connect (we’ll cover that a bit later), Fit APIs don’t gather a lot of health data. Google Fit can, with user permission, read heart rate, blood sugar and oxygen, and others from Bluetooth devices via integration with third-party plugins, but it’s not recommended to use them as a ground for medical insight. 

 

Apple’s HealthKit, on the other hand, gathers quite a bit of medical data, including: 

 

  • Labs results 
  • Respiratory rates during sleep 
  • Virus exposure info 
  • Mindfulness data 
  • Immunization/vaccination info 
  • Walking stability* 

 

There are many other data types related to people’s medical conditions. Apple has released a Healthcare service for people to sync up their Health app with their healthcare provider’s Electronic Health Record system via EHR APIs. It only works in the USA but already gives users a lot of control over their health and provides them with better, faster communication with their doctors. 

 

Lastly, while Google Fit isn’t built for gathering medical data, it’s easy to create custom data types within its SDK. HealthKit doesn’t allow for it. 

 

*Walking stability is measured to prevent fall accidents for seniors and people with chronic conditions and notify a doctor if they’ve happened. 

Ecosystems for Google Fit and Health

Both Google and Apple are giants in the tech market that have been doing quite a push into healthcare in recent years. 

 

Google has bought Fitbit and partnered with Nike, Samsung, and many others gaining integration with their wearables. They’ve also started re-building their old project called Google Health, and it grew into Google Brain, DeepMind, and Nest Labs — analytics companies that work with medical and research data. 

 

Apart from that, Google introduced Health Connect API in May 2022, a new API for Android apps that will cover health data and replace the Fit Android API at the end of 2024. With it, users’ data won’t be stored in the cloud, but on user devices, won’t be connected to a user’s Google account, and will create a unified health and fitness data view across users’ Android apps. In other words, Google did a push toward security and health tech inclusion like Apple did.  

 

Apple, apart from HealthKit — a tool that allows users to gain a comprehensive picture of people’s health and wellness data, — also releases ResearchKit and CareKit. Despite the confusion, these platforms are closer to Health — an app that is, essentially, a “visual” layer of data HealthKit works with. 

 

ResearchKit helps conduct clinical studies and has a range of features that make asking for consent, delivering tasks to trial participants, and surveying them easier. CareKit is a platform that helps follow care plans, set and achieve wellness goals, and track the progress of one’s recovery. 

 

Now Apple also tightly collaborates with clinics and EHR vendors, boosting interoperability in healthcare. 

Addressing Privacy & Cybersecurity Challenges of Working With Health Data

While Google and Apple do everything possible to make sure user data stays safe, it’s still important to focus on security when developing apps that work with users’ data through Google Fit APIs and HealthKit. Develop concise and understandable consent forms that list all data you’re planning to utilize. Install access policies like two-factor authentication, especially if the app connects to a payment gateway and users put their financial data in it. 

 

If you’re using HealthKit and planning to build a digital therapeutic (like the Sleepio app that received an approval to be utilized as insomnia treatment by the National Institute for Care and Excellence, or EndeavorRx that gained an FDA waiver to be used in ADHD management for kids), you’ll need to run clinical trials and comply with health and patient privacy regulations that exist in the country you’re planning to market your product. For American digital health products, that would be HIPAA Rules and FDA requirements

 

That would ensure you’re okay to work with patients’ private health information, your method of treatment is evidence-based, and you can collaborate with hospitals and insurers after the product’s release. It’s a tough and time-consuming process, but it gives the product legitimacy and superiority over thousands of health apps on the market that look good and don’t do anything useful. Do not make security an afterthought. 

Diversido’s Case Study: HealthMentor App 

Now, as an example of how using Google Fit and the toolkit with its APIs can help streamline the process of app development, we’ll tell you about Health Mentor. It’s an app we’ve developed recently, and its idea is grounded in the fact that people take better care of themselves if they’re encouraged to do so and praised after doing it consistently. Apart from that, if people are tracking their progress consistently and receive feedback about it, they’re more likely to develop new habits and achieve their goals. 

healthmentor interface

 

We’ve taken that idea and put it into an app for coaches that help people eat healthier, lose or gain weight, fix nerve-wracking sleep schedules, and exercise regularly. Users can set behavioral goals, see other people who move towards theirs, and support each other through the process in chats. Coaches encourage their clients to move forward and help them navigate the challenges along the way. There is a library of learning materials users can study to recognize self-defeating language and harmful thought patterns and build healthier self-esteem. 

 

HealthMentor tracks data related to nutrition, sleep, and exercise. The app breaks down calories and macronutrient consumption and calories burned to help coaches create meal plans and exercise programs, tailored to insights from clients’ data. We’ve enabled Health Mentor to connect to users’ tracking apps (and wearables that gather data for them) both on Android and iOS — through Google Fit and Apple HealthKit. With the app, coaches can see which clients are doing well and which need some encouragement to comply with the plans better in real-time, which helps to consistently develop new, healthy habits. 

Final Note

Now, healthcare APIs are growing in demand. They are a part of every data-gathering solution, and by 2027, the global healthcare APIs market is predicted to reach $393.73 million. Google and Apple are major players in this market, and with the former making a deeper dive into healthcare in 2024 and the latter already collaborating with hospitals and EHR vendors, there’s no wonder their APIs are the most commonly utilized. 

 

When developing apps that will utilize health APIs from Google Fit and HealthKit, it’s important to work in a security-first, user-centric fashion. If you’re interested in utilizing users’ healthcare data to build health or wellness solutions, drop us a line.

leave

Your comment

Leave a Reply

Your email address will not be published.

take a look on

Similar posts

By: Tanya Kobzar

24.03.22

How Gamification Improves Healthcare and..

The role of gamification in healthcare app development, benefits of using gamification..

By: Tanya Kobzar

11.11.21

Integration of Wireless IoT Devices..

The Internet of Things devices integrations within healthcare, wireless IoT system, and..

By: Tanya Kobzar

8.10.21

What Is HIPAA Compliance?

Read here about, HIPAA violations and rules, expert security tips, protected health..

Top