---
title: Migrating from Google Fit to Health Connect in Capacitor
description: Google Fit APIs shut down at the end of 2026. This Google Fit to Health Connect migration guide covers Capacitor apps, with a data type mapping table.
date:
  created: 2026-08-17
  updated: 2026-08-17
authors:
  - robingenz
categories:
  - Capacitor
  - Guides
  - SDKs
links:
  - Capacitor Health: sdks/capacitor/health.md
faq: true
---

# Migrating from Google Fit to Health Connect in Capacitor

Google supports the Fit APIs only until the end of 2026, and new developer signups have been closed since May 1, 2024. If your app still reads steps, workouts or heart rate through Fit, you are on a deadline. A Google Fit to Health Connect migration in a Capacitor app also involves more than swapping one Android SDK for another, because Health Connect exists on Android only and the iOS side of your app talks to Apple HealthKit.

This guide covers three things: what actually replaces each Fit API, a full Fit to Health Connect data type mapping table, and the steps to port a Capacitor codebase. The [Capacitor Health plugin](../../sdks/capacitor/health.md) handles the last part with a single API for both platforms.

<!-- more -->

<div class="capawesome-z29o10a">
  <a href="https://capawesome.io/" target="_blank">
    <img alt="Build and deploy your Capacitor app with Capawesome Cloud" src="https://capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1" />
  </a>
</div>

## Key Takeaways

- The [Google Fit APIs](https://developers.google.com/fit){:target="_blank"}, including the REST API, are supported until the end of 2026. Google has published no exact shutdown day, and new signups closed on May 1, 2024.
- Health Connect replaces the Fit APIs on Android phones. The REST API maps to the Google Health API, Wear OS moves to Health Services, the Goals API has no replacement, and the BLE API maps to the Android Bluetooth APIs.
- Health Connect is Android-only. On iOS, health data lives in Apple HealthKit, so a Capacitor app needs both integrations.
- Health Connect ships with the operating system on Android 14 and later. On Android 9 to 13 the user may have to install it first.
- The [Capacitor Health plugin](../../sdks/capacitor/health.md) covers both stores through one typed API with around 20 data types, aggregation buckets and workout reads.
- Health Connect limits reads to the 30 days before the permission was first granted. HealthKit has no time limit.

## What Replaces the Google Fit API in a Capacitor App?

Health Connect replaces the Google Fit APIs on Android, and Apple HealthKit is the equivalent on iOS. In a Capacitor app you integrate both, or use a plugin that wraps both. No single Google API spans the two platforms.

Google's [Fit migration guide](https://developer.android.com/health-and-fitness/health-connect/migration/fit){:target="_blank"} breaks the replacements down per API, and the destinations differ more than most teams expect:

| Google Fit API | Phone | Wear OS |
|---|---|---|
| Recording API | Health Connect | Health Services (`PassiveMonitoringClient`, `ExerciseClient`) |
| History API | Google Health API | Read from the phone app via Health Connect |
| Sensors API | Android sensors, Fused Location Provider API | Health Services (`MeasureClient`, `PassiveMonitoringClient`) |
| Sessions API | Google Health API for read and write; track running sessions in your own app state | Health Services for start and stop, Health Connect for read and write |
| Goals API | No replacement | No replacement |
| BLE API | Android Bluetooth APIs | Android Bluetooth APIs |

Two rows catch teams off guard. The Goals API has no successor at all, so goal tracking moves to your own backend or local storage. And the History API, which most server-backed apps reached through the REST endpoint, points at the Google Health API rather than Health Connect: a cloud API with its own onboarding, not an on-device store.

If your Fit usage was really sensor access in disguise, neither destination fits. Live step cadence belongs to the [Capacitor Pedometer plugin](../../sdks/capacitor/pedometer.md), and heart rate straps or other BLE peripherals to the [Capacitor Bluetooth Low Energy plugin](../../sdks/capacitor/bluetooth-low-energy.md).

## When Do the Google Fit APIs Stop Working?

At the end of 2026. Google's wording is that the Fit APIs "will only be supported until the end of 2026", with no exact shutdown date announced, so treat any specific day you read elsewhere as a guess. The signup freeze is already in effect: since May 1, 2024, developers cannot sign up to use the Fit APIs at all, so a Capacitor app that has not onboarded yet has no path to Fit today. Existing integrations keep working until the cutoff, and Google's advice is to migrate now for uninterrupted service.

## Google Fit to Health Connect Data Type Mapping

Most Google Fit data types have a one-to-one counterpart in Health Connect, a handful have none, and every record name changes. This table maps each Fit type to its [Health Connect record](https://developer.android.com/health-and-fitness/guides/health-connect/plan/data-types){:target="_blank"} and to the plugin's `DataType` value:

| Google Fit data type | Health Connect record | Capacitor Health `DataType` |
|---|---|---|
| `com.google.step_count.delta` | `StepsRecord` | `Steps` |
| `com.google.distance.delta` | `DistanceRecord` | `Distance` |
| `com.google.calories.expended` | `TotalCaloriesBurnedRecord` | `TotalCalories` |
| `com.google.calories.bmr` | `BasalMetabolicRateRecord` | — |
| `com.google.heart_rate.bpm` | `HeartRateRecord` | `HeartRate` |
| `com.google.weight` | `WeightRecord` | `Weight` |
| `com.google.height` | `HeightRecord` | `Height` |
| `com.google.body.fat.percentage` | `BodyFatRecord` | `BodyFat` |
| `com.google.hydration` | `HydrationRecord` | `Hydration` |
| `com.google.sleep.segment` | `SleepSessionRecord` | `Sleep` |
| `com.google.activity.segment` | `ExerciseSessionRecord` | `Workout` |
| `com.google.blood_pressure` | `BloodPressureRecord` | `BloodPressure` |
| `com.google.blood_glucose` | `BloodGlucoseRecord` | `BloodGlucose` |
| `com.google.oxygen_saturation` | `OxygenSaturationRecord` | `OxygenSaturation` |
| `com.google.body.temperature` | `BodyTemperatureRecord` | `BodyTemperature` |
| `com.google.nutrition` | `NutritionRecord` | — |
| `com.google.speed` | `SpeedRecord` | — |
| `com.google.power.sample` | `PowerRecord` | — |
| `com.google.cycling.pedaling.cadence` | `CyclingPedalingCadenceRecord` | — |
| `com.google.location.sample` | Exercise route inside `ExerciseSessionRecord` | — |
| `com.google.active_minutes` (Move Minutes) | — | — |
| `com.google.heart_minutes` (Heart Points) | — | — |

Basal metabolic rate is the row worth reading twice. Health Connect keeps it as its own record, but the plugin does not expose it separately, because on iOS `TotalCalories` is already computed as active plus basal energy burned. Android has a dedicated total calories record instead.

### Which Fit Data Types Have No Health Connect Equivalent?

Move Minutes and Heart Points have no equivalent. Both are Google Fit scoring concepts, calculated by Fit rather than stored as measurements, and Health Connect has nothing that corresponds to them. If your UI showed either metric, recompute something similar from exercise sessions and heart rate, or drop it and tell users why. No migration path preserves the historical values.

The remaining gaps are plugin-side. Nutrition, speed, power and cycling cadence exist as Health Connect records but are not in the plugin's data type set, so those still need a native bridge. The trade runs the other way too: Health Connect carries measurements Fit never exposed, surfaced as `RestingHeartRate`, `HeartRateVariability`, `RespiratoryRate`, `FloorsClimbed` and `Vo2Max`.

One change is easy to miss because it is not technical. Fit's [health data types](https://developers.google.com/fit/datatypes/health){:target="_blank"} for blood pressure, blood glucose, oxygen saturation and body temperature required approval for restricted OAuth scopes. Health Connect has no OAuth scopes. Every health permission goes through a Google Play health apps declaration instead, a review with a different shape and a different failure mode.

## Why Health Connect Alone Doesn't Cover iOS

Health Connect is an Android platform component with no iOS build, so porting a Fit integration to Health Connect fixes exactly half of a Capacitor app. On iOS, health data lives in HealthKit: a separate framework with its own record types, its own permission model, and an entitlement you add in Xcode.

The two platforms then disagree in ways that reach into your JavaScript. HealthKit hides read permission status by design, so on iOS a read permission is never `granted`, only `prompt` before the first request and `unknown` after it. Health Connect never reports one as `denied`. Android caps historical reads at 30 days before the first grant, iOS has no limit. Heart rate variability is RMSSD on Android and SDNN on iOS, and the values are not comparable. `sourceName` is always `null` on Android, because Health Connect provides only a package name.

Writing all of that twice is the real cost of going cross-platform. The [Capacitor Health plugin](../../sdks/capacitor/health.md) puts both stores behind one API and documents each divergence instead of papering over it. It ships through the Capawesome [Insiders](../../insiders/index.md) subscription, so it is a paid dependency, and it requires Capacitor 8.

## How to Migrate Your Capacitor App

### 1. Audit your Fit calls

Sort every Fit call in your codebase into four buckets: history reads, aggregated reads, session reads and writes, and inserts. That grouping is the migration plan, because each bucket maps onto exactly one plugin method.

### 2. Install and configure the plugin

Follow the [Installation](../../sdks/capacitor/health.md#installation) section in the plugin documentation for the setup steps. Budget time for the configuration Fit never needed: `minSdkVersion 26` in `variables.gradle`, an `android.permission.health.*` entry in `AndroidManifest.xml` for every data type you use, a `PRIVACY_POLICY_URL` meta-data element, a ProGuard keep rule, plus the HealthKit capability and the `NSHealthShareUsageDescription` and `NSHealthUpdateUsageDescription` keys on iOS.

### 3. Gate on availability

Fit rode on Google Play services and was effectively always there. Health Connect is not, so check availability first and offer the install prompt when the device is supported but the app is missing:

```typescript
import { DataType, Health, WorkoutType } from '@capawesome-team/capacitor-health';

const { available, reason } = await Health.isAvailable();
if (!available && reason === 'health-connect-not-installed') {
  await Health.installHealthConnect();
}
```

Both [`isAvailable()`](../../sdks/capacitor/health.md#isavailable) and [`installHealthConnect()`](../../sdks/capacitor/health.md#installhealthconnect) have no Fit analogue: new code, not a replacement.

### 4. Replace the OAuth flow with permissions

A Health Connect integration has no Google API Console project, no client ID and no consent screen. Permissions are declared in the manifest and granted by the user inside Health Connect, which reduces your sign-in code to a single call:

```typescript
await Health.requestPermissions({
  read: [DataType.Steps, DataType.Distance, DataType.HeartRate, DataType.Workout],
  write: [DataType.Weight],
});
```

Use [`checkPermissions(...)`](../../sdks/capacitor/health.md#checkpermissions) to inspect the current state and [`openSettings()`](../../sdks/capacitor/health.md#opensettings) to reach the health settings, the only recovery path once Health Connect stops showing the dialog.

### 5. Replace History API reads

Individual record reads move to [`readRecords(...)`](../../sdks/capacitor/health.md#readrecords). Fit's per-data-source reads translate to the `dataOrigins` filter, which takes package names on Android and bundle identifiers on iOS:

```typescript
const { records } = await Health.readRecords({
  dataType: DataType.Steps,
  startDate: '2026-08-01T00:00:00.000Z',
  endDate: '2026-08-08T00:00:00.000Z',
  limit: 100,
  ascending: true,
  dataOrigins: ['com.google.android.apps.fitness'],
});
```

### 6. Replace bucketed reads

Anything that used Fit's `bucketByTime` with an aggregate data type becomes [`aggregate(...)`](../../sdks/capacitor/health.md#aggregate). The platform runs the aggregation and deduplicates overlapping records from a phone and a watch, which you should not reimplement in JavaScript:

```typescript
const { buckets } = await Health.aggregate({
  dataType: DataType.Steps,
  startDate: '2026-08-01T00:00:00.000Z',
  endDate: '2026-08-08T00:00:00.000Z',
  bucket: 'day',
  operations: ['sum'],
});
```

### 7. Replace the Sessions API

Sessions become workouts, read through [`readWorkouts(...)`](../../sdks/capacitor/health.md#readworkouts) with an optional type filter. Fit's activity types map onto the plugin's `WorkoutType` enum, which covers more than 50 values and falls back to `OTHER` with the raw platform value preserved:

```typescript
const { workouts } = await Health.readWorkouts({
  startDate: '2026-07-01T00:00:00.000Z',
  endDate: '2026-08-01T00:00:00.000Z',
  workoutType: WorkoutType.Running,
  limit: 50,
});
```

### 8. Replace inserts

Writes go through [`writeRecord(...)`](../../sdks/capacitor/health.md#writerecord), and the writable set is narrower than Fit's: blood glucose, blood pressure, height, hydration, steps, weight and workouts. Blood pressure is the shape change to watch, since it uses `systolic` and `diastolic` instead of a single `value`:

```typescript
await Health.writeRecord({
  dataType: DataType.BloodPressure,
  startDate: new Date().toISOString(),
  systolic: 118,
  diastolic: 76,
});
```

### 9. Re-submit for review

Every app that integrates with Health Connect has to complete the [Health apps declaration](https://support.google.com/googleplay/android-developer/answer/14738291){:target="_blank"} in the Play Console and be approved for the permission types it requests, backed by a privacy policy that explains how the health data is used. Without approval, the release gets rejected. Plan for review time before you ship, not after.

## What Changes After You Migrate?

The API surface gets smaller, but three behaviors change in ways your users will notice.

The first is history. On Android, reads only reach 30 days back from the moment the permission was first granted, so a chart that used to render a year of Fit data looks almost empty right after install and fills in over the following weeks. Build an empty state for it.

The second is permission visibility. Fit's OAuth scopes told you exactly what you had; neither platform does that now. Design around the presence of data instead: request, query, and show a helpful message when nothing comes back.

The third is that health data no longer travels through a Google account. Health Connect and HealthKit are on-device stores, so nothing syncs across devices and nothing reaches your server unless you send it there yourself. That is a privacy improvement and a feature you may need to rebuild.

## FAQ

### Is Google Fit being shut down?

The Google Fit APIs are. Google states that they are supported until the end of 2026 and has not published an exact shutdown date. New developer signups have been closed since May 1, 2024.

### What replaces the Google Fit REST API?

The Google Health API, not Health Connect. Health Connect is an on-device store with an Android SDK and no cloud endpoint, so a server-side integration that used the Fit REST API needs a different destination than a mobile one.

### Does Health Connect work on iOS?

No. Health Connect is an Android platform component with no iOS version. On iOS, health data is stored in Apple HealthKit, which a cross-platform Capacitor app has to integrate separately.

### Can I read Google Fit data through Health Connect?

Only what the Google Fit app itself has written to Health Connect while the user had that connection enabled. Health Connect does not import your historical Fit data, and Android's 30-day cap applies to what you can read regardless.

### Do I still need a Google API Console project?

Not for Health Connect. There are no OAuth scopes and no consent screen. Permissions are declared in your manifest and granted by the user in Health Connect, with a Play Console health apps declaration replacing Google's scope approval.

### Is the Capacitor Health plugin free?

No. It is part of the Capawesome [Insiders](../../insiders/index.md) subscription, which is a paid plan that also includes priority support and access to the other Insiders plugins.

## Try Capawesome

Migrations like this one land better when you hear about the deadline months early rather than weeks. Subscribe below and new Capacitor guides land in your inbox as they are published.

[Subscribe to the Capawesome Newsletter](https://capawesome.io/newsletter/){ .md-button .md-button--primary }

## Conclusion

The API calls are the easy part. The expensive part is the data model: Move Minutes and Heart Points have no successor and no historical import, the 30-day read window makes your app look brand new to returning users, and roughly half the work has nothing to do with Health Connect at all, because Android's replacement stops at the platform boundary and iOS still needs HealthKit. Start with the audit, decide early which metrics you are willing to lose, and the code changes follow quickly.

If your Fit usage was closer to raw sensors than to stored health records, [The Complete Guide to Capacitor Device Sensors](./capacitor-device-sensors-guide.md) covers that side of the platform. Questions are welcome in the [Capawesome Discord server](https://discord.gg/VCXxSVjefW){:target="_blank"}, and the [Capawesome newsletter](https://capawesome.io/newsletter/){:target="_blank"} is where new plugins and guides get announced first.
