com.google.android.gms.fitness
Stay organized with collections
Save and categorize content based on your preferences.
Contains the Google Fit APIs.
Interfaces
BleApi
|
This interface is deprecated. Use
BluetoothManager
directly. To get data from a Ble device into the Fit platform, use
HistoryApi.insertData(GoogleApiClient, DataSet) to manually insert data
obtained from local sensors. This API will be removed in the future, after which it
will stop working for existing users. |
ConfigApi
|
This interface is deprecated. For reading and
writing historical fitness data, use Health Connect
instead. |
GoalsApi
|
This interface is deprecated. For reading and
writing historical fitness data, use Health Connect
instead. |
HistoryApi
|
This interface is deprecated. For reading and
writing historical fitness data, use Health Connect
instead. |
RecordingApi
|
This interface is deprecated. Use
RecordingClient .
|
SensorsApi
|
This interface is deprecated. For apps
targeting Wear OS 3, use Health Services
instead. Otherwise for access to live sensor and location data use SensorManager
and FusedLocationProviderClient ,
respectively. |
SessionsApi
|
This interface is deprecated. For reading and
writing historical fitness data, use Health Connect
instead. For recording sessions on Wear OS 3 devices, use Health Services
instead. |
Classes
BleClient
|
This class is deprecated. Use BluetoothManager
directly. To get data from a Ble device into the Fit platform, use
HistoryClient.insertData(DataSet) to manually insert data obtained from
local sensors. This API will be removed in the future, after which it will stop working
for existing users. |
ConfigClient
|
This class is deprecated. For reading and
writing historical fitness data, use Health Connect
instead. |
Fitness
|
The main entry point to Google Fit
APIs. |
FitnessActivities
|
Constants representing different user activities,
such as walking, running, and cycling. |
FitnessLocal
|
The main entry point to the Recording API on
mobile. |
FitnessOptions
|
Fitness options for requesting permissions via
GoogleSignIn.requestPermissions(android.app.Activity, int, GoogleSignInAccount,
GoogleSignInOptionsExtension) . |
FitnessOptions.Builder
|
Builder to build FitnessOptions. |
FitnessStatusCodes
|
Fitness specific status codes, for use in
Status.getStatusCode()
|
GoalsClient
|
This class is deprecated. For reading and
writing historical fitness data, use Health Connect
instead. |
HistoryApi.ViewIntentBuilder
|
Builder of intents to view data stored in Google
Fit. |
HistoryClient
|
This class is deprecated. For reading and
writing historical fitness data, use Health Connect
instead. |
LocalRecordingClient
|
Client which enables low-power, always-on
background collection of local sensor data. |
RecordingClient
|
Client which enables low-power, always-on
background collection of sensor data into the Google Fit store. |
SensorsClient
|
This class is deprecated. For apps targeting
Wear OS 3, use Health Services
instead. Otherwise for access to live sensor and location data use SensorManager
and FusedLocationProviderClient ,
respectively. |
SessionsApi.ViewIntentBuilder
|
Builder of intents to view sessions
stored in Google Fit. |
SessionsClient
|
This class is deprecated. For reading and
writing historical fitness data, use Health Connect
instead. For recording sessions on Wear OS 3 devices, use Health Services
instead. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["The Google Fit APIs provide access to fitness data and sensors."],["Many Google Fit APIs are deprecated in favor of Health Connect or Health Services for newer Android and Wear OS versions."],["`Fitness` is the main entry point for Google Fit APIs, while `FitnessActivities` defines activity types."],["`FitnessOptions` helps request permissions for accessing fitness data."],["Developers should transition to Health Connect or Health Services for future development."]]],["The provided content outlines Google Fit APIs, including interfaces and classes, many of which are deprecated. Developers should migrate to Health Connect for historical fitness data. Ble devices should utilize `BluetoothManager` and insert data manually via `HistoryApi.insertData`. Live sensor data should use `SensorManager` and `FusedLocationProviderClient`. Wear OS 3 should use Health Services. Recording APIs are being replaced with `RecordingClient` and `LocalRecordingClient`. The entry point to Google Fit is through the `Fitness` class. `FitnessActivities` is used to define user activity types.\n"]]