Skip to content

Version 2.0

Latest

Choose a tag to compare

@Dasonic Dasonic released this 29 Mar 02:55

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. Call startListening() instead.
  • getStepsInLastSeconds(numSeconds) has been removed. Call getStepsSinceStart() instead.
    Step deltas over time should now be tracked in GDScript by comparing successive totals.
  • The ACTIVITY_RECOGNITION permission 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 since startListening() 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