PackageTrack
Sign in Get early access

accurate_step_counter

Production-grade step counter for Flutter Android. TYPE_STEP_COUNTER foreground service on all API 24+, production-hardened rate caps and merge policies, SQLite logging, midnight/boot recovery, and BYO Health Connect smart merge.

3.1.0 rahulshahDEV/accurate_step_counter

What this package is like to depend on

Last release 26 days ago

28 Jul 2026

Ships unpredictably

gaps range from 8 days to 5 months

Rarely documented

notes for 9 of 39 stable releases

Nothing withdrawn

no release was ever pulled

9 months old

39 releases · first in 2025

39 releases in the last 12 months

see the full history below

Release timeline

39 releases · Nov 2025 to Jul 2026
2026
Release Pre-release

Releases

latest 39
  1. 3.1.0 28 Jul 2026
    Release notes

    Added

    • iOS support via HealthKit (health package) with filtered step reads and HC smoothing semantics aligned with meltdown.
    • New internal IosHealthStepDetector service that emits realtime step events from Health app totals.
    • Cross-platform example flow now handles iOS initialization cleanly.

    Changed

    • watchTodaySteps() remains immediate and floor-protected while now supporting iOS live step source.
    • Package positioning updated from Android-only to Android + iOS HealthKit.

    Fixed

    • Native event merge now always applies floor protection before emitting (prevents downward jitter on transient resets).
    • Rotation drain persists previous day totals into SQLite with date anchoring.
    Open source →
  2. 3.0.0 26 Jul 2026
    Release notes

    Breaking

    • Primary detection is now TYPE_STEP_COUNTER FGS on all Android API 24+ (including Samsung). Previous API≤29 / non-Samsung gate removed.
    • SmartMergeHelper.mergeStepCounts semantics changed — no longer naive max(). Uses StepLogic (HC duplication band, sensor overcount at 1.10×, HC can correct downward, server floor). Prefer SmartMergeHelper.merge() for full MergeDecision flags.
    • Legacy auto-start of StepCounterForegroundService on app termination is off by default to prevent dual-FGS fights.
    • StepDetectorConfig.useForegroundServiceOnOldDevices defaults to false (legacy sensors_plus fallback only).

    Added

    • Production-hardened StepCounterService: prefs persist, reboot detect, burst/minute/hour caps with baseline fold-in, vehicle/bicycle Activity Recognition filter, TYPE_STEP_DETECTOR cross-check, exact midnight alarm, BootReceiver, TimeChangeReceiver, rotation stamps
    • ActivityClassifier + soft-fail without Play Services (play-services-location)
    • Dart policies: StepLogic, MergePolicy, smoothHcReading, RotationGuard, StepRateLimiter
    • Platform APIs: setNotificationDisplay, forceUpdateTodaySteps, consumeLastRotation, resetNativeStepState
    • startTracking() — one-call setup (DB + FGS + aggregated logging)
    • Short aliases: isBatteryOptimized(), requestBatteryOptimization()
    • Safe calibration from SQLite today (sensor=0, seed ≤40k) on start
    • Native↔SQLite reconcile on aggregated start (fixes undercount after process death)
    • Rotation drain on start / resume / step stream
    • Ported production policy unit tests under test/policy/
    • Soft uses-feature for stepcounter/stepdetector (required=false)
    • Consumer ProGuard keep rules for services/receivers

    Fixed (production DX / hardening)

    • Skip legacy terminated-prefs sync when the native FGS is available (no dual recovery)
    • Example + verification check TYPE_STEP_COUNTER FGS, not fallback detector
    • Removed 500ms artificial delay from initSteps (now aliases startTracking)
    • Collapsed duplicate getTodaySteps / getYesterdaySteps definitions
    • Cold-start day-gap restore stamps KEY_LAST_ROTATION_* and persists rotated prefs
    • Activity Recognition PendingIntent uses explicit component + unique request code; receiver in manifest
    • Removed Play-risk permissions USE_EXACT_ALARM, BODY_SENSORS, BODY_SENSORS_BACKGROUND, HIGH_SAMPLING_RATE_SENSORS
    • Plugin no longer permanently registers a second TYPE_STEP_COUNTER listener (battery)
    • Kotlin unit test matches real MethodChannel API
    • NotificationChannel creation guarded for API 24–25 (StepCounterService)
    • dispose() / stopLogging() flush write buffer and cancel flush timer

    Migration

    1. Bump to ^3.0.0 and request ACTIVITY_RECOGNITION + notifications before startTracking().
    2. Prefer await steps.startTracking() over the old three-call sequence.
    3. If you relied on naive max merge, switch to SmartMergeHelper.merge(...) and handle MergeDecision.
    4. Keep notification synced with setNativeNotificationDisplay(merged) — do not force-write merged HC into sensor baseline.
    5. Supply HC/server yourself (BYO); package does not embed Health Connect SDK.
    Open source →
  3. 2.0.0 28 Feb 2026
    Release notes

    Major: Native Step Service + Smart Merge

    This release promotes the native TYPE_STEP_COUNTER foreground service as the primary detection strategy and adds the SmartMergeHelper utility for combining multiple step sources.

    Added

    • SmartMergeHelper — combine sensor + Health Connect + server (naive max in 2.x)
    • Native Step Service Status APIisNativeStepServiceRunning(), isUsingNativeStepService

    Changed

    • VERSION BUMP to 2.0.0
    • README rewritten for TYPE_STEP_COUNTER architecture

    Fixed

    • StepCounterService.kt — added isRunning flag

    Removed

    • Stale Hive artifacts

    Open source →
  4. 1.9.5 22 Feb 2026
    Release notes

    Fixed

    • Background isolate sqflite initialization error — Added DartPluginRegistrant.ensureInitialized() to isolate entry point
    Open source →
  5. 1.9.4 22 Feb 2026
    Release notes

    Added

    • Terminated sync gap reconciliation with idempotent deterministic gap keys
    • Single-flight terminated sync to prevent concurrent reprocessing
    • Production example flow in example app
    Open source →
  6. 1.9.3 03 Feb 2026
    Release notes

    Added

    • Automatic 30-day log retention policy
    • Database write batching (3-second buffer)
    • Background isolate for database operations (StepRecordConfig.lowEndDevice())
    • Stream emission throttling (max 10Hz)
    Open source →
  7. 1.9.1 28 Jan 2026
    Release notes

    Verified

    • ANR-safe architecture audit: all Kotlin I/O on Dispatchers.IO, async SharedPreferences, background SQLite
    Open source →
  8. 1.9.0 28 Jan 2026
    Release notes

    Changed

    • Database migration: Hive → sqflite — Indexed SQL queries, smaller footprint, no code generation needed

    Removed

    • Hive dependencies (hive, hive_flutter, hive_generator, build_runner)
    Open source →
  9. 1.8.12 28 Jan 2026
    Release notes

    See git history for pre-1.9.0 notes.

    Open source →
  10. 1.8.11 28 Jan 2026

    Nothing published for this version

  11. 1.8.10 27 Jan 2026

    Nothing published for this version

  12. 1.8.9 21 Jan 2026

    Nothing published for this version

  13. 1.8.8 20 Jan 2026

    Nothing published for this version

  14. 1.8.7 20 Jan 2026

    Nothing published for this version

  15. 1.8.5 19 Jan 2026

    Nothing published for this version

  16. 1.8.4 19 Jan 2026

    Nothing published for this version

  17. 1.8.3 14 Jan 2026

    Nothing published for this version

  18. 1.8.2 13 Jan 2026

    Nothing published for this version

  19. 1.8.1 12 Jan 2026

    Nothing published for this version

  20. 1.8.0 11 Jan 2026

    Nothing published for this version

  21. 1.7.8 09 Jan 2026

    Nothing published for this version

  22. 1.7.7 09 Jan 2026

    Nothing published for this version

  23. 1.7.6 09 Jan 2026

    Nothing published for this version

  24. 1.7.5 09 Jan 2026

    Nothing published for this version

  25. 1.7.4 08 Jan 2026

    Nothing published for this version

  26. 1.7.3 08 Jan 2026

    Nothing published for this version

  27. 1.7.2 08 Jan 2026

    Nothing published for this version

  28. 1.7.1 08 Jan 2026

    Nothing published for this version

  29. 1.7.0 08 Jan 2026

    Nothing published for this version

  30. 1.6.0 08 Jan 2026

    Nothing published for this version

  31. 1.5.0 07 Jan 2026

    Nothing published for this version

  32. 1.4.0 07 Jan 2026

    Nothing published for this version

  33. 1.3.1 07 Jan 2026

    Nothing published for this version

  34. 1.3.0 07 Jan 2026

    Nothing published for this version

  35. 1.2.1 02 Jan 2026

    Nothing published for this version

  36. 1.2.0 30 Dec 2025

    Nothing published for this version

  37. 1.1.1 03 Dec 2025

    Nothing published for this version

  38. 1.1.0 27 Nov 2025

    Nothing published for this version

  39. 1.0.0 20 Nov 2025

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive