AI-generated Key Takeaways
-
Most of the Google Fit APIs listed, including interfaces like BleApi, ConfigApi, GoalsApi, HistoryApi, RecordingApi, SensorsApi, and SessionsApi, are deprecated.
-
Several deprecated APIs recommend using Health Connect for reading and writing historical fitness data.
-
For Ble device integration, deprecated interfaces and classes suggest using BluetoothManager and inserting data manually via HistoryApi or HistoryClient.
-
Deprecated APIs for live sensor data and sessions on Wear OS 3 direct users to Health Services, while other live sensor access should use SensorManager and FusedLocationProviderClient.
-
Fitness class serves as the main entry point to 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. |