Flutter Tracking SDK
The Flutter Tracking SDK is a Dart wrapper around the native Android
and iOS Tracking SDKs, connected through a single
MethodChannel named TrackingSdk. It collects location in foreground, background and (on
Android) terminated state, and pushes journey and event data to your backend.
Purpose and goals of the SDK
Flutter has no direct access to platform location APIs, so this SDK bridges Dart to the same native Tracking SDK used by native Android and iOS apps. The Dart layer only forwards calls - all tracking behaviour, permissions handling and background collection are implemented natively, so the platform behaviours documented on the Android and iOS pages apply here as well.
Architecture
Flutter Dart UI
|
TrackingSdk.dart
|
MethodChannel("TrackingSdk")
|
Android MainActivity.kt / iOS SceneDelegate.swift
|
Native Sovereign Tracking SDK
|
Background Location Tracking
Overview of the SDK features and capabilities
- Background location collection - via the native Android and iOS Tracking SDKs.
- Start / stop tracking -
initAndStartTracking(),stopTracking(). - State queries -
getTrackingState(),getSavedTrackingStatus(). - Token lifecycle -
sync(),refreshAccessToken(),destroy().
Continue to Get Started to add the SDK to your Flutter project.