tracelet_platform_interface
π 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.
A common platform interface for the Tracelet background geolocation plugin.
This package provides the abstract classes and types that the platform-specific implementations (tracelet_android, tracelet_ios, tracelet_web) implement.
It also contains shared Dart algorithms used by all platforms: LocationProcessor (distance/accuracy/speed/mock filtering), KalmanLocationFilter (GPS smoothing), AdaptiveSamplingEngine (activity/battery/speed-based distance filter), GeofenceEvaluator, TripManager, ScheduleParser, PersistDecider, and GeoUtils. See MockDetectionLevel enum and LocationProcessor mock detection for cross-platform spoof rejection.
New in 1.1.0
BatteryBudgetEngineβ feedback control loop that adjustsdistanceFilter,desiredAccuracy, and periodic interval to maintain a configurable battery budget (%/hr). EmitsBudgetAdjustmentEventwith current drain, target, and new parameters.CarbonEstimatorβ per-trip and cumulative COβ emission calculator using mode-specific factors (gCOβ/km). ReturnsTripCarbonSummarywith emissions and distance by transport mode.DeltaEncoderβ batch location compression codec achieving 60β80% payload reduction via delta encoding with configurable coordinate precision.RTree<T>β generic R-tree spatial index for O(log n) geofence proximity queries. SupportsqueryCircle()andqueryBBox()with Haversine post-filtering.
The OEM Compatibility API (getSettingsHealth(), openOemSettings()) is defined here as abstract methods, with platform implementations providing manufacturer-specific behavior.
Usage
You should not depend on this package directly. Instead, depend on tracelet which automatically includes the correct platform implementation.
This package is only relevant if you are writing a custom platform implementation for Tracelet.
Related Packages
| Package | Description |
|---|---|
tracelet |
App-facing Dart API β the only package you depend on |
tracelet_android |
Android implementation |
tracelet_ios |
iOS implementation |
tracelet_web |
Web implementation |
More Information
Libraries
- tracelet_platform_interface
- The platform interface for the Tracelet background geolocation plugin.