Google Fit — What It Is, Platform Architecture and APIs

Author: IT Sectr Published: 2026-03-25 Reading time: 8 min

Google Fit platform — Google’s ecosystem for collecting, storing and analyzing physical activity and health data of Android users. According to Google Developers, 2025, the platform combines Fitness API, Sensors API and Sessions API into a single architecture that syncs with Google Cloud and is accessible via REST requests. A unified health profile allows users to control which apps have access to their fitness and wellness data.

Key Takeaways

  • Google Fit — a health platform from Google that combines physical activity data from different apps.
  • Fitness API — the main interface for reading and writing data on steps, calories and heart rate.
  • Sensors API — allows receiving real-time data from device sensors.
  • Sessions API — manages activity sessions: workouts, walks, runs.
  • Google Fit SDK is available for Android and iOS, as well as via REST API for web servers.

What Is Google Fit?

Google Fit is a health management platform launched by Google in 2014 at the I/O conference. The platform provides a unified API for reading and writing physical activity data, allowing apps to exchange information through a central repository in the Google cloud.

Unlike proprietary solutions, Google Fit works on the Android operating system and iOS via REST API. Users can connect fitness bands, smartwatches and activity tracking apps, and Google Fit aggregates all data into a single health profile in Google Cloud.

According to Google I/O 2024, the platform is used in over 5000 apps worldwide, with active users exceeding 100 million. The platform is integrated with Wear OS and supports all popular fitness trackers through third-party apps.

Google Fit Architecture

Google Fit architecture is built on three layers: client SDK, Google Fitness Store cloud storage, and REST API for server integration. The client SDK is available for Android (Kotlin, Java) and iOS (Swift, Objective-C), and there is also a web client via JavaScript.

Data is organized as sources (DataSource) and data points (DataPoint). Each source represents a device or app, and each data point represents a single measurement with a timestamp. Groups of data points are combined into sessions — continuous periods of activity with a type and duration.

kotlin
val fitnessClient = Fitness.getClient(activity, GoogleSignIn
    .getAccountForExtension(activity, fitnessOptions))

val stepType = DataType.TYPE_STEP_COUNT_DELTA

val request = DataReadRequest.Builder()
    .read(stepType)
    .setTimeRange(
        startTime, endTime, TimeUnit.MILLISECONDS
    )
    .build()

fitnessClient.readData(request)
    .addOnSuccessListener { response ->
        for (bucket in response.buckets) {
            println(bucket.dataSets)
        }
    }

How Google Fit Works

Google Fit uses a sync model through Google Cloud with support for both online and offline modes. The app records data locally, and the Google Fit SDK automatically syncs it with the cloud storage when an internet connection is available. Conflicts are resolved on a last-write-wins basis.

Each data type has a standardized format: steps — TYPE_STEP_COUNT_DELTA, calories — TYPE_CALORIES_EXPENDED, heart rate — TYPE_HEART_RATE_BPM, distance — TYPE_DISTANCE_DELTA. For custom types, you can create custom DataType through the Google APIs Console with a unique namespace.

The platform supports two recording modes: active — the app explicitly calls HistoryClient.insertData(), and passive — via RecordingClient, which subscribes to data collection in the background. Passive mode is convenient for fitness apps: the user launches the app once, and Google Fit automatically collects steps, calories and distance while the app is minimized, without constant CPU usage.

According to Google, the platform processes over 2 billion data points daily. Average sync latency is 5–10 seconds with an active connection, and in background mode sync occurs every 30 minutes to save battery life.

User Consent and Security

Google Fit uses OAuth 2.0 for authorization with access scopes fitness.activity.read, fitness.activity.write, fitness.body.read and fitness.body.write. The app requests only necessary scopes, and the user confirms access through the standard Google Sign-In dialog with account selection.

The user can revoke access at any time through Google Account Permissions or the Google Fit app. Google strictly prohibits sharing health data with third parties without explicit consent, as well as using data for advertising purposes in accordance with the Restricted Scopes policy.

Google Fit APIs

Google Fit provides three main APIs: Fitness API for reading and writing historical data, Sensors API for real-time streaming data from sensors, and Sessions API for managing activity sessions. Each API is available both through the Android SDK and via REST requests.

Fitness API — the main API for working with data. It supports batch operations: writing up to 1000 data points in a single call, reading with filtering by time range, data type and source. For data aggregation, DataSet is used with grouping by selected metrics.

Sensors API allows subscribing to real-time sensor data — steps, heart rate, acceleration. Data is received via SensorEventListener at a frequency determined by the sensor type and app settings.

In addition to the three main APIs, Google Fit provides Recording API for automatic data collection without needing to keep the app active. This API is especially valuable for Wear OS: smartwatches can collect heart rate and activity data, and the phone app syncs with them when connected. Recording API uses Google Fit Background Services, which are optimized for minimal power consumption — up to 2% battery per day with passive step collection.

REST API Google Fit is available at the fitness.googleapis.com endpoint. REST API allows server applications to read and write data on behalf of the user after OAuth authorization. This is useful for web analytics dashboards, corporate fitness programs and medical systems that require centralized storage of employee or patient health data.

kotlin
val recordingClient = Fitness
    .getRecordingClient(activity, googleSignInAccount)

recordingClient.subscribe(DataType.TYPE_STEP_COUNT_DELTA)
    .addOnSuccessListener {
        println("Subscription active")
    }

// Getting history data
val historyClient = Fitness
    .getHistoryClient(activity, googleSignInAccount)

val endTime = Calendar.getInstance().timeInMillis
val startTime = endTime - TimeUnit
    .DAYS.toMillis(7)

historyClient.readDailyTotal(DataType.TYPE_STEP_COUNT_DELTA)
    .addOnSuccessListener { total ->
        println("Steps today: $total")
    }

Integrating Google Fit into an App

Google Fit integration starts with adding dependencies for the Google Fit SDK via build.gradle: com.google.android.gms:play-services-fitness. After that, you need to configure the Google APIs Console — create a project, enable the Fitness API and add OAuth 2.0 credentials with the correct SHA-1 fingerprints.

The integration process includes: initializing GoogleSignIn with the required scopes, creating a FitnessClient via Fitness.getClient(), requesting user authorization, and performing read or write data operations. For background recording, RecordingClient is used, which automatically collects data even when the app is minimized. Google Fit automatically manages data collection frequency based on battery level and user activity.

According to Google, apps with Google Fit integration show 35% higher user retention rates. Key app categories — fitness trackers, running, cycling, yoga and weight control apps.

It is important to consider privacy requirements: Google Fit uses Restricted Scopes — special access scopes that require separate app verification through OAuth Verification. The developer must describe what data is collected, how it is used and how long it is stored. Google also requires a privacy policy and compliance with the API Services Terms of Service.

Practical Recording Example

To record data, a DataSource is created with the type, device and app specified. Then a DataPoint is created with a timestamp and values. Multiple DataPoints are combined into a DataSet, which is passed to HistoryClient.write().

kotlin
val dataSource = DataSource.Builder()
    .setAppPackageName(activity)
    .setDataType(DataType.TYPE_STEP_COUNT_DELTA)
    .setType(DataSource.TYPE_RAW)
    .build()

val stepCount = DataPoint.builder(dataSource)
    .setTimestamp(now, TimeUnit.MILLISECONDS)
    .setField(Field.FIELD_STEPS, 500)
    .build()

val dataSet = DataSet.builder(dataSource)
    .add(stepCount)
    .build()

historyClient.insertData(dataSet)
    .addOnSuccessListener {
        println("Data saved")
    }

Frequently Asked Questions

What data does Google Fit support?

Google Fit supports over 50 data types, including steps, calories, heart rate, distance, speed, sleep, weight, height, blood pressure, glucose level and body temperature. The full list is available in the DataType documentation for Android and REST API.

Is a Google account required for Google Fit?

Yes, using Google Fit requires a Google account. The user authorizes via Google Sign-In, after which the app gets access to the Fitness API with the specified scopes. Without a Google account, the platform is unavailable since all data is stored in Google Cloud.

Can data be exported from Google Fit?

Yes, Google Fit data can be exported via Google Takeout — the service allows downloading all platform data in JSON and CSV formats. Developers can programmatically export data through the REST API with the appropriate access scope.

How is Google Fit different from HealthKit?

Google Fit is a cross-platform cloud platform that works on Android, iOS and via REST API, while HealthKit is tied to the Apple iOS ecosystem and stores data locally on the device. Google Fit uses OAuth 2.0 for authorization, while HealthKit uses iOS system permissions.

What are the Google Fit API limits?

Google Fit API has the following limits: 1000 requests per 100 seconds per project, 1000 data points per write request, maximum read time range — 365 days per request. To increase limits, you need to request a quota through Google Cloud Console.

Summary

  • Google Fit — a cross-platform cloud health platform from Google, launched in 2014.
  • The platform provides three APIs: Fitness, Sensors and Sessions for different usage scenarios.
  • About 5000 apps use Google Fit, and the number of users exceeds 100 million.
  • OAuth 2.0 ensures secure authorization with granular access scopes.
  • Google Cloud guarantees real-time sync and access via REST API.
  • Integration requires setting up the Google APIs Console and connecting the SDK via build.gradle.
  • Recording API collects data in the background with minimal battery consumption of up to 2% per day.

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also