https://github.com/krishak15/step-logger
Easy to use step tracker plugin with session history and built-in background support
https://github.com/krishak15/step-logger
flutter flutter-plugin pedometer
Last synced: 4 months ago
JSON representation
Easy to use step tracker plugin with session history and built-in background support
- Host: GitHub
- URL: https://github.com/krishak15/step-logger
- Owner: Krishak15
- License: mit
- Created: 2025-05-24T16:05:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-12T06:29:32.000Z (12 months ago)
- Last Synced: 2025-10-22T22:13:39.386Z (8 months ago)
- Topics: flutter, flutter-plugin, pedometer
- Language: Dart
- Homepage:
- Size: 109 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Step Logger πΆββοΈ


A Flutter plugin for cross-platform step tracking with background support.
## Features
- π Real-time step counting
- π Background service for continuous tracking (Android)
- π
Historical session data storage
- π Customizable notification
- π± Works in foreground and background
- π Automatic session recovery after app kills
## Platform Support
Feature
Android
iOS
Real-time steps
β
β
Background tracking
β
β οΈ Limited
Session history
β
β
Step accuracy
High
High
Battery impact
Moderate
Low
## Android Setup
### Permissions βοΈ
Add to ```android/app/src/main/AndroidManifest.xml```:
```xml
```
## Service declaration
```xml
```
## iOS Setup
### Requirements
1. **Add HealthKit entitlement:**
- In Xcode, go to your target's **Signing & Capabilities**.
- Click "+" and add **HealthKit**.
2. **Add these entries to your `Info.plist`:**
```xml
NSHealthShareUsageDescription
We need access to HealthKit to track your steps
NSHealthUpdateUsageDescription
We need access to HealthKit to save your step data
UIBackgroundModes
fetch
healthkit
NSUserNotificationAlertStyle
alert
```
## iOS Limitations
β οΈ **Important iOS Considerations**
1. **Background step updates require explicit user permission.**
2. **Steps are only recorded when:**
- The app is in the foreground.
- The user has HealthKit background delivery enabled.
- The user opens the app periodically (to sync latest data).
3. **Step data accuracy depends on the device**
4. **Sessions interrupted by app kills will:**
- Persist tracking state.
- Recover steps when the app relaunches.
- Auto-stop sessions older than 12 hours.
> **Note:** iOS does not support true background step tracking services like Android. The plugin uses HealthKit background delivery as a workaround, which depends on system scheduling and user permissions. This means background updates may be delayed or less frequent compared to Android, and step counts are calculated when the app is brought to the foreground.