traccar_client_sdk 0.0.8
traccar_client_sdk: ^0.0.8 copied to clipboard
Flutter plugin for background location tracking. Wraps the Traccar Client SDK for Android and iOS.
traccar_client_sdk #
Flutter plugin for background location tracking. Posts updates to a Traccar server. Wraps the Traccar Client SDK for Android and iOS — see the main repository for features, architecture, and reliability details.
Requires Android API 24+ and iOS 15+.
Usage #
import 'package:traccar_client_sdk/traccar_client_sdk.dart';
final tracker = TraccarClientSdk();
await tracker.start(
serverUrl: 'https://demo.traccar.org',
deviceId: '123456',
);
// later
await tracker.stop();
// diagnostic logs
final logs = await tracker.getLogs();
Permissions #
The plugin requests location, notification (Android 13+), and activity recognition (Android 10+) permissions at runtime via a transparent activity. On first start it also prompts to disable battery optimization for reliable background tracking.
On iOS, add NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription keys to your app's Info.plist.
License #
Apache License 2.0 — see LICENSE.