startForegroundService method
Starts the Android foreground service so positioning continues after the app is closed. Events are delivered through the same events stream while the app is open, and through the setBackgroundHandler callback while the app is closed.
Implementation
Future<MapxusMethodResponse> startForegroundService({
required String appId,
required String secret,
String notificationTitle = 'Mapxus Positioning',
String notificationContent = 'Location tracking is active',
}) =>
_platform.startForegroundService(
appId: appId,
secret: secret,
notificationTitle: notificationTitle,
notificationContent: notificationContent,
);