Overview
Version 2.0.0 is a major rework of the plugin, replacing the Google Fit Recording API with Android's built-in SensorManager. This removes the dependency on Google Play Services entirely, making the plugin work on a much wider range of devices including
those running custom Android distributions such as GrapheneOS.
Breaking Changes
subscribeToFitnessData()has been removed. CallstartListening()instead.getStepsInLastSeconds(numSeconds)has been removed. CallgetStepsSinceStart()instead.
Step deltas over time should now be tracked in GDScript by comparing successive totals.- The
ACTIVITY_RECOGNITIONpermission replaces the previous Google Fit fitness permissions.
New Features
isStepCounterAvailable()— check whether the device has a step counter sensor before use.startListening()— begin reading from the device's built-in step counter sensor.stopListening()— stop reading from the sensor.getStepsSinceStart()— retrieve total steps counted sincestartListening()was called.resetSteps()— reset the step count back to zero.
Bug Fixes
- Fixed step counts being significantly lower than expected due to raw data point reads instead
of aggregation.
Requirements
- Godot 4.2 or higher
- Android API 26 (Android 8.0) or higher
- No Google Play Services or Health Connect required