tracelet_android 3.7.4
tracelet_android: ^3.7.4 copied to clipboard
Android implementation of the Tracelet background geolocation plugin.
tracelet_android #
π Official Documentation: tracelet.ikolvi.com
β‘ Set up Tracelet with AI. Clicking the badge opens Tracelet and copies a ready-made prompt β paste it into your AI coding assistant (Cursor, Claude Code, Kiro, Copilot Chatβ¦) and it interviews you, then installs and configures Tracelet in your Flutter app.
Android implementation of the Tracelet background geolocation plugin.
This package uses Kotlin and native Android APIs (FusedLocationProvider, Room, WorkManager, Geofencing API) to provide production-grade background location tracking.
Native Features #
- Kalman Filter GPS Smoothing β Extended Kalman Filter implementation (
KalmanLocationFilter.kt) smooths raw GPS coordinates using device-reported accuracy as measurement noise. Produces cleaner tracks and eliminates jitter. Learn more β - Trip Detection β
TripManager.kttracks motion state transitions to detect trip start/stop. Each trip includes distance, duration, waypoints, and start/stop locations. Learn more β - Polygon Geofences β Ray-casting point-in-polygon algorithm in
GeofenceManager.ktfor arbitrary polygon containment checks alongside circular geofences. Learn more β - Mock Location Detection β Multi-layered spoof detection using
Location.isMock()(API 31+) /isFromMockProvider()(API 18+), satellite count analysis, andSystemClock.elapsedRealtimeNanosdrift detection. Configurable viaMockDetectionLevel. Learn more β - Unlimited Geofences β Proximity-based auto-load/unload in
GeofenceManager.kt. Only the closest geofences withingeofenceProximityRadiusare registered with the OS (up to 100), enabling monitoring of thousands of geofences. Geofences are dynamically swapped on each location update withgeofencesChangeevents. - OEM Compatibility β Automatic mitigations for aggressive OEM power management: Huawei PowerGenie wakelock tag hack, Xiaomi autostart detection, Samsung/OnePlus/Oppo/Vivo settings deep-links, boot receiver wakelock, and ProGuard consumer rules. Settings Health API exposes device health for user-facing onboarding. Learn more β
- HTTP Sync Retry Engine β Configurable retry with exponential backoff in
HttpSyncManager.ktfor transient 5xx, 429, and timeout failures. RespectsRetry-Afterheaders and defers sync on connectivity loss. Learn more β - Configurable Motion Sensitivity β
MotionDetector.ktreadsshakeThreshold,stillThreshold, andstillSampleCountfrom config at runtime, allowing per-app tuning of accelerometer sensitivity without code changes. - Delta Encoding β Native
DeltaEncoder.ktcompresses HTTP sync payloads by encoding only field deltas between consecutive locations, achieving 60β80% bandwidth reduction. Mirrors the Dart implementation for platform consistency. - Wi-Fi-Only Sync β
HttpSyncManager.ktsupportsdisableAutoSyncOnCellularto skip auto-sync on cellular networks. - Periodic Mode β
PeriodicLocationWorkersupports configurable intervals (60 secβ12 hrs), foreground service for sub-15-minute intervals, and exact alarms viaAlarmManager.setExactAndAllowWhileIdle().
Usage #
You should not depend on this package directly. Instead, depend on tracelet which automatically includes this package on Android builds.
dependencies:
tracelet: ^1.1.0
For Android-specific setup (permissions, Gradle configuration), see the Android Setup Guide.
Related Packages #
| Package | Description |
|---|---|
tracelet |
App-facing Dart API β the only package you depend on |
tracelet_platform_interface |
Abstract platform interface |
tracelet_ios |
iOS implementation |
tracelet_web |
Web implementation |