initialize method

Future<void> initialize()

Initialize the service

This must be called before start. It sets up the native background location tracking service.

Implementation

Future<void> initialize() async {
  if (_isInitialized) return;

  try {
    await BackgroundLocator.initialize();
    _isInitialized = true;
    debugPrint('LiveLocationService initialized');
  } catch (e) {
    debugPrint('Failed to initialize LiveLocationService: $e');
    rethrow;
  }
}