[Bug]: Location Tracking Lasts 10 minutes
Required Reading
- [x] Confirmed
Plugin Version
5.0.0-beta
Flutter Doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.38.3, on macOS 15.5 24F74 darwin-arm64, locale es-CL)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Connected device (2 available)
[✓] Network resources
• No issues found!
Mobile operating-system(s)
- [ ] iOS
- [x] Android
Device Manufacturer(s) and Model(s)
Samsung S25
Device operating-systems(s)
Android 15
What happened?
App stops sending tracking information after 10 minutes.
It should be continue sending info until stopped.
Having debug=true it continue beeping but it does not send the request.
Plugin Code and/or Config
class BackgroundLocationProService {
BackgroundLocationProService._();
static final BackgroundLocationProService instance =
BackgroundLocationProService._();
bool _configured = false;
String? _url;
Map<String, dynamic> _data = {};
// Check if Background Geolocation Pro is enabled for this app
bool get isEnabled {
final enabled = dotenv.env['ENABLE_BG_LOCATION_PRO']?.toLowerCase();
return enabled == 'true';
}
Future<Map<String, dynamic>> configure(Map<String, dynamic> settings) async {
// Return early if plugin is not enabled (no license for this app)
if (!isEnabled) {
AppGlobal.printLog(
'[BG Geolocation] Plugin disabled for this app (ENABLE_BG_LOCATION_PRO=false)');
return {'enabled': false, 'disabled_reason': 'no_license'};
}
_url = settings['url'] as String?;
_data = (settings['data'] as Map<String, dynamic>?) ?? {};
// Build params that the plugin will send with each location
final Map<String, dynamic> params = Map<String, dynamic>.from(_data);
// For trip monitoring: need updates even when stationary
// Server timeout: 2 minutes (120s) without updates = "connection lost"
final int intervalMs = settings['interval'] ?? 30000; // 30 seconds default
final config = Config(
// Some options (like reset) remain on the root config
reset: settings['reset'] ?? true,
notification: Notification(
title: Constants.appName!,
text: "Modo Activo",
channelName: "Location Tracking",
priority: NotificationPriority.high,
sticky: true, // CRITICAL: Prevent user from dismissing notification
),
// Geolocation-related options
geolocation: GeoConfig(
desiredAccuracy: DesiredAccuracy.navigation;,
// CRITICAL: Set distanceFilter to 0 to enable time-based updates
// With distanceFilter: 0, locationUpdateInterval takes effect
distanceFilter: 0,
// Time-based location updates (works when distanceFilter: 0)
// This gets you updates even when stationary (default 60s)
locationUpdateInterval: 30000, // in milliseconds
fastestLocationUpdateInterval: 3000,
locationTimeout: 60,
),
// App / lifecycle options
app: AppConfig(
// Headless Mode: Continue tracking even when app is terminated
enableHeadless: true,
stopOnTerminate: false,
startOnBoot: true,
// Heartbeat as backup (min 60s on Android)
// iOS only with preventSuspend: true
heartbeatInterval: 60.0,
preventSuspend: true,
),
// HTTP Configuration - plugin will auto-POST locations
http: HttpConfig(
url: _url,
params: {"data": params},
headers:
{
'Content-Type': 'application/json',
},
autoSync: true,
batchSync: true,
maxBatchSize: -1,
),
// Logging / debug options
logger: LoggerConfig(
debug: true,
// If you were previously passing a numeric logLevel, you may
// want to adjust this mapping to LogLevel.* accordingly.
logLevel: LogLevel.verbose,
),
);
final state = await BackgroundGeolocation.ready(config);
if (!_configured) {
_configured = true;
// Set up event listeners for debugging/logging
// onLocation: Fires for EVERY location recorded while moving
// Plugin auto-POSTs these to the configured URL
BackgroundGeolocation.onLocation((Location location) {
AppGlobal.printLog(
'[BG Geolocation] Location: ${location.coords.latitude}, ${location.coords.longitude}, sample: ${location.sample}');
});
// onHeartbeat: Fires periodically (every heartbeatInterval seconds)
// even when stationary. Plugin auto-POSTs the location.
BackgroundGeolocation.onHeartbeat((HeartbeatEvent event) {
AppGlobal.printLog(
'[BG Geolocation] Heartbeat: location will be posted to server');
});
// CRITICAL: Monitor when tracking stops (helps debug service termination)
BackgroundGeolocation.onEnabledChange((bool enabled) {
AppGlobal.printLog(
'[BG Geolocation] ⚠️ Tracking state changed: ${enabled ? "STARTED" : "STOPPED"}');
});
// Monitor connectivity issues that could stop location sync
BackgroundGeolocation.onConnectivityChange((ConnectivityChangeEvent event) {
AppGlobal.printLog(
'[BG Geolocation] Connectivity: ${event.connected ? "CONNECTED" : "DISCONNECTED"}');
});
// Monitor GPS/location provider changes
BackgroundGeolocation.onProviderChange((ProviderChangeEvent event) {
AppGlobal.printLog(
'[BG Geolocation] Provider - GPS enabled: ${event.enabled}, Status: ${event.status}');
});
}
final map = state.toMap();
return map != null ? Map<String, dynamic>.from(map) : <String, dynamic>{};
}
Future<Map<String, dynamic>> start() async {
await BackgroundGeolocation.start();
final state = await BackgroundGeolocation.state;
final map = state.toMap();
return map != null ? Map<String, dynamic>.from(map) : <String, dynamic>{};
}
Future<Map<String, dynamic>> stop() async {
await BackgroundGeolocation.stop();
final state = await BackgroundGeolocation.state;
final map = state.toMap();
return map != null ? Map<String, dynamic>.from(map) : <String, dynamic>{};
}
}
Relevant log output
Provide logs of "this 10 minutes of tracking".
I tried using emailLogs but the app crashes when I do that.
Show me the crash stacktrace
Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference
Please post the entire stacktrace so I can find out where I need to fix this.
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference at com.transistorsoft.locationmanager.logger.b.a(r8-map-id-fed9c793a1b3acbad67608d85536913f32d28bd6b5c81e75c327bd553cfdfa9b:119) at com.transistorsoft.locationmanager.logger.b.b(r8-map-id-fed9c793a1b3acbad67608d85536913f32d28bd6b5c81e75c327bd553cfdfa9b:291) at com.transistorsoft.locationmanager.logger.TSLog$c.run(r8-map-id-fed9c793a1b3acbad67608d85536913f32d28bd6b5c81e75c327bd553cfdfa9b:35) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651) at java.lang.Thread.run(Thread.java:1119)
where are you calling .emailLog relative to where you call .ready(config)?
here is whole file.
import 'dart:async';
import 'dart:convert';
import 'package:flutter_background_geolocation/flutter_background_geolocation.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:urvan_driver/Utils/AppGlobal.dart';
import 'package:urvan_driver/Utils/Constants.dart';
class BackgroundLocationProService {
BackgroundLocationProService._();
static final BackgroundLocationProService instance =
BackgroundLocationProService._();
bool _configured = false;
String? _url;
Map<String, dynamic> _data = {};
String? _playerId;
DesiredAccuracy _resolveDesiredAccuracy(dynamic value) {
// If it's already the correct type, just return it.
if (value is DesiredAccuracy) return value;
// Legacy numeric values from v4 (int) or custom codes from JS bridge.
if (value is int) {
// Map typical accuracy thresholds to enum values.
if (value <= 10) return DesiredAccuracy.navigation;
if (value <= 100) return DesiredAccuracy.high;
if (value <= 1000) return DesiredAccuracy.medium;
return DesiredAccuracy.low;
}
// Allow string-based values like 'high', 'medium', etc.
if (value is String) {
switch (value.toLowerCase()) {
case 'navigation':
return DesiredAccuracy.navigation;
case 'high':
return DesiredAccuracy.high;
case 'medium':
return DesiredAccuracy.medium;
case 'low':
return DesiredAccuracy.low;
}
}
// Default used when no value or unrecognized type is provided.
return DesiredAccuracy.navigation;
}
// Check if Background Geolocation Pro is enabled for this app
bool get isEnabled {
final enabled = dotenv.env['ENABLE_BG_LOCATION_PRO']?.toLowerCase();
return enabled == 'true';
}
Future<Map<String, dynamic>> configure(Map<String, dynamic> settings) async {
// Return early if plugin is not enabled (no license for this app)
if (!isEnabled) {
AppGlobal.printLog(
'[BG Geolocation] Plugin disabled for this app (ENABLE_BG_LOCATION_PRO=false)');
return {'enabled': false, 'disabled_reason': 'no_license'};
}
AppGlobal.printLog(
'[BG Geolocation] ${_configured ? "Reconfiguring" : "Configuring"} plugin...');
_url = settings['url'] as String?;
_data = (settings['data'] as Map<String, dynamic>?) ?? {};
_playerId = settings['playerId'] as String?;
AppGlobal.printLog('[BG Geolocation] 📍 Config - URL: $_url');
AppGlobal.printLog('[BG Geolocation] 📍 Config - Player ID: $_playerId');
AppGlobal.printLog('[BG Geolocation] 📍 Config - Additional data: $_data');
// Build params that the plugin will send with each location
final Map<String, dynamic> params = Map<String, dynamic>.from(_data);
if (_playerId != null) {
params['playerId'] = _playerId;
}
// For trip monitoring: need updates even when stationary
// Server timeout: 2 minutes (120s) without updates = "connection lost"
final int intervalMs = settings['interval'] ?? 30000; // 30 seconds default
AppGlobal.printLog(
'[BG Geolocation] ⏱️ Config - Update interval: ${intervalMs}ms (${(intervalMs / 1000).round()}s)');
AppGlobal.printLog(
'[BG Geolocation] ⏱️ Config - Heartbeat interval: ${settings['heartbeatInterval'] ?? 60.0}s');
AppGlobal.printLog(
'[BG Geolocation] 📏 Config - Distance filter: ${settings['distanceFilter'] ?? 0}m');
AppGlobal.printLog(
'[BG Geolocation] 🎯 Config - Desired accuracy: ${settings['desiredAccuracy'] ?? "navigation"}');
AppGlobal.printLog(
'[BG Geolocation] 🚫 Config - Auto-stop disabled (stopTimeout: 0, stopOnStationary: false)');
final config = Config(
// Some options (like reset) remain on the root config
reset: settings['reset'] ?? true,
// Geolocation-related options
geolocation: GeoConfig(
desiredAccuracy: _resolveDesiredAccuracy(settings['desiredAccuracy']),
// CRITICAL: Set distanceFilter to 0 to enable time-based updates
// With distanceFilter: 0, locationUpdateInterval takes effect
distanceFilter: settings['distanceFilter'] ?? 0,
// Time-based location updates (works when distanceFilter: 0)
// This gets you updates even when stationary (default 60s)
locationUpdateInterval: intervalMs, // in milliseconds
fastestLocationUpdateInterval: intervalMs,
locationTimeout: settings['locationTimeout'] ?? 60,
// CRITICAL: Set to 0 to disable auto-stop when stationary
// Location tracking continues until manually stopped
stopTimeout: 0,
),
// App / lifecycle options
app: AppConfig(
// Headless Mode: Continue tracking even when app is terminated
enableHeadless: true,
stopOnTerminate: false,
startOnBoot: true,
// Heartbeat as backup (min 60s on Android)
// iOS only with preventSuspend: true
heartbeatInterval: settings['heartbeatInterval'] ?? 60.0,
preventSuspend: true,
notification: Notification(
title: Constants.appName!,
text: "Modo Activo",
channelName: "Location Tracking",
priority: NotificationPriority.high,
sticky: true, // CRITICAL: Prevent user from dismissing notification
),
),
// HTTP Configuration - plugin will auto-POST locations
http: HttpConfig(
url: _url,
params: {"data": params},
headers: settings['headers'] ??
{
'Content-Type': 'application/json',
},
autoSync: settings['autoSync'] ?? true,
batchSync: settings['batchSync'] ?? true,
maxBatchSize: settings['maxBatchSize'] ?? -1,
),
// Logging / debug options
logger: LoggerConfig(
debug: settings['debug'] ?? false,
// If you were previously passing a numeric logLevel, you may
// want to adjust this mapping to LogLevel.* accordingly.
logLevel: settings['logLevel'] ?? LogLevel.verbose,
),
// Activity detection options
activity: ActivityConfig(
// CRITICAL: Keep tracking even when device is stationary
// Only manual stop() calls will halt location tracking
stopOnStationary: false,
),
);
final state = await BackgroundGeolocation.ready(config);
AppGlobal.printLog(
'[BG Geolocation] ✅ Plugin ready - State: enabled=${state.enabled}, tracking=${state.trackingMode}');
AppGlobal.printLog(
'[BG Geolocation] 📊 Current state - scheduledSync=${state.schedulerEnabled}, preventSuspend=${state.preventSuspend}');
if (!_configured) {
_configured = true;
// Set up event listeners for debugging/logging
// onLocation: Fires for EVERY location recorded while moving
// Plugin auto-POSTs these to the configured URL
BackgroundGeolocation.onLocation((Location location) {
final coords = location.coords;
AppGlobal.printLog('[BG Geolocation] 📍 Location captured:');
AppGlobal.printLog(
' ├─ Lat/Lng: ${coords.latitude.toStringAsFixed(6)}, ${coords.longitude.toStringAsFixed(6)}');
AppGlobal.printLog(
' ├─ Accuracy: ${coords.accuracy.toStringAsFixed(1)}m | Speed: ${coords.speed.toStringAsFixed(1)}m/s');
AppGlobal.printLog(
' ├─ Altitude: ${coords.altitude.toStringAsFixed(1)}m | Heading: ${coords.heading.toStringAsFixed(0)}°');
AppGlobal.printLog(
' ├─ Sample: ${location.sample} | Moving: ${location.isMoving} | Activity: ${location.activity.type}');
AppGlobal.printLog(' └─ Timestamp: ${location.timestamp}');
}, (LocationError error) async {
AppGlobal.printLog(
'[BG Geolocation] ❌ Location error: ${error.code} - ${error.message}');
await Sentry.captureException(error, stackTrace: StackTrace.current,
withScope: (scope) {
scope.setTag('source', 'BackgroundGeolocation.onLocation');
scope.setExtra('code', error.code);
});
});
// onHeartbeat: Fires periodically (every heartbeatInterval seconds)
// even when stationary. Plugin will attempt to get and post location.
BackgroundGeolocation.onHeartbeat((HeartbeatEvent event) async {
AppGlobal.printLog(
'[BG Geolocation] ⏰ Heartbeat triggered - attempting to get current location');
// Manually get current position on heartbeat to ensure it's captured
try {
final location = await BackgroundGeolocation.getCurrentPosition(
samples: 1,
timeout: 30,
);
AppGlobal.printLog(
'[BG Geolocation] ✓ Heartbeat location acquired: ${location.coords.latitude}, ${location.coords.longitude}');
} catch (e, stackTrace) {
AppGlobal.printLog(
'[BG Geolocation] ✗ Heartbeat location failed: $e');
await Sentry.captureException(e, stackTrace: stackTrace);
}
});
// CRITICAL: Monitor when tracking stops (helps debug service termination)
BackgroundGeolocation.onEnabledChange((bool enabled) {
AppGlobal.printLog(
'[BG Geolocation] ⚠️ Tracking state changed: ${enabled ? "STARTED" : "STOPPED"}');
});
// Monitor connectivity issues that could stop location sync
BackgroundGeolocation.onConnectivityChange(
(ConnectivityChangeEvent event) {
AppGlobal.printLog(
'[BG Geolocation] Connectivity: ${event.connected ? "CONNECTED" : "DISCONNECTED"}');
});
// Monitor GPS/location provider changes
BackgroundGeolocation.onProviderChange((ProviderChangeEvent event) {
AppGlobal.printLog(
'[BG Geolocation] Provider - GPS enabled: ${event.enabled}, Status: ${event.status}');
});
// Monitor HTTP requests to track if locations are being sent to server
BackgroundGeolocation.onHttp((HttpEvent event) {
if (event.success) {
AppGlobal.printLog(
'[BG Geolocation] ✓ HTTP POST successful: ${event.status}');
} else {
AppGlobal.printLog(
'[BG Geolocation] ✗ HTTP POST failed: ${event.status} - ${event.responseText}');
}
});
AppGlobal.printLog(
'[BG Geolocation] ℹ️ Event listeners configured. Use emailLogs() to send debug logs.');
}
final map = state.toMap();
return map != null ? Map<String, dynamic>.from(map) : <String, dynamic>{};
}
Future<Map<String, dynamic>> start() async {
if (!isEnabled) {
AppGlobal.printLog('[BG Geolocation] ❌ Cannot start - plugin disabled');
return {'enabled': false, 'disabled_reason': 'no_license'};
}
AppGlobal.printLog('[BG Geolocation] 🚀 Starting location tracking...');
await BackgroundGeolocation.start();
final state = await BackgroundGeolocation.state;
AppGlobal.printLog(
'[BG Geolocation] ✅ Tracking started - enabled: ${state.enabled}');
AppGlobal.printLog(
'[BG Geolocation] 📊 Tracking mode: ${state.trackingMode}, odometer: ${state.odometer}m');
final map = state.toMap();
return map != null ? Map<String, dynamic>.from(map) : <String, dynamic>{};
}
Future<Map<String, dynamic>> stop() async {
if (!isEnabled) {
AppGlobal.printLog('[BG Geolocation] ❌ Cannot stop - plugin disabled');
return {'enabled': false, 'disabled_reason': 'no_license'};
}
AppGlobal.printLog('[BG Geolocation] 🛑 Stopping location tracking...');
await BackgroundGeolocation.stop();
final state = await BackgroundGeolocation.state;
AppGlobal.printLog(
'[BG Geolocation] ⏹️ Tracking stopped - enabled: ${state.enabled}');
final map = state.toMap();
return map != null ? Map<String, dynamic>.from(map) : <String, dynamic>{};
}
Future<Map<String, dynamic>> clearLocations() async {
if (!isEnabled) {
AppGlobal.printLog('[BG Geolocation] ❌ Cannot clear - plugin disabled');
return {'enabled': false, 'disabled_reason': 'no_license'};
}
AppGlobal.printLog('[BG Geolocation] 🗑️ Clearing all saved locations...');
try {
await BackgroundGeolocation.destroyLocations();
AppGlobal.printLog('[BG Geolocation] ✅ Cleared all saved locations');
} catch (e, stackTrace) {
AppGlobal.printLog('[BG Geolocation] ❌ Error clearing locations: $e');
await Sentry.captureException(e, stackTrace: stackTrace);
}
final state = await BackgroundGeolocation.state;
final map = state.toMap();
return map != null ? Map<String, dynamic>.from(map) : <String, dynamic>{};
}
Future<Map<String, dynamic>> getState() async {
if (!isEnabled) {
return {'enabled': false, 'disabled_reason': 'no_license'};
}
final state = await BackgroundGeolocation.state;
final map = state.toMap();
return map != null ? Map<String, dynamic>.from(map) : <String, dynamic>{};
}
Future<bool> getEnabled() async {
final state = await BackgroundGeolocation.state;
return state.enabled;
}
Future<Map<String, dynamic>> getCurrentPosition(
Map<String, dynamic> options) async {
if (!isEnabled) {
AppGlobal.printLog(
'[BG Geolocation] ❌ Cannot get position - plugin disabled');
return {'error': 'Plugin disabled', 'disabled_reason': 'no_license'};
}
AppGlobal.printLog(
'[BG Geolocation] 📡 Getting current position (timeout: ${options['timeout'] ?? 'default'})...');
try {
final location = await BackgroundGeolocation.getCurrentPosition(
persist: options['persist'] ?? false,
samples: options['samples'],
timeout: options['timeout'],
maximumAge: options['maximumAge'],
);
AppGlobal.printLog(
'[BG Geolocation] ✅ Got current position: ${location.coords.latitude}, ${location.coords.longitude}');
AppGlobal.printLog(
'[BG Geolocation] 📊 Accuracy: ${location.coords.accuracy}m | Timestamp: ${location.timestamp}');
return Map<String, dynamic>.from(location.toMap());
} catch (e, stackTrace) {
AppGlobal.printLog(
'[BG Geolocation] ❌ Failed to get current position: $e');
await Sentry.captureException(e, stackTrace: stackTrace);
rethrow;
}
}
/// Send debug logs via email
/// This will open the device's email app with logs attached
Future<Map<String, dynamic>> emailLogs(String emailAddress) async {
if (!isEnabled) {
AppGlobal.printLog(
'[BG Geolocation] ❌ Cannot send logs - plugin disabled');
return {'success': false, 'error': 'Plugin disabled'};
}
AppGlobal.printLog(
'[BG Geolocation] 📧 Preparing to send logs to: $emailAddress');
try {
final success = await Logger.emailLog(
emailAddress, SQLQuery(order: SQLQuery.ORDER_DESC));
if (success) {
AppGlobal.printLog(
'[BG Geolocation] ✅ Email log dialog opened successfully');
return {'success': true, 'message': 'Email client opened'};
} else {
AppGlobal.printLog('[BG Geolocation] ❌ Failed to open email client');
return {'success': false, 'error': 'Failed to open email client'};
}
} catch (e, stackTrace) {
AppGlobal.printLog('[BG Geolocation] ❌ Error sending logs: $e');
await Sentry.captureException(e, stackTrace: stackTrace);
return {'success': false, 'error': e.toString()};
}
}
/// Upload debug logs to Sentry as an attachment
Future<Map<String, dynamic>> sendLogsToSentry() async {
if (!isEnabled) {
AppGlobal.printLog(
'[BG Geolocation] ❌ Cannot send logs - plugin disabled');
return {'success': false, 'error': 'Plugin disabled'};
}
AppGlobal.printLog('[BG Geolocation] 📤 Uploading logs to Sentry...');
try {
// Get logs from plugin
// Provide a query to avoid potential null pointer issues in native code
final logContent =
await Logger.getLog(SQLQuery(order: SQLQuery.ORDER_DESC));
if (logContent.isEmpty) {
AppGlobal.printLog('[BG Geolocation] ⚠️ No logs to send');
return {'success': false, 'message': 'No logs to send'};
}
// Create attachment
final attachment = SentryAttachment.fromIntList(
utf8.encode(logContent),
'bg_geolocation.log',
contentType: 'text/plain',
);
// Capture message with attachment
final sentryId = await Sentry.captureMessage(
'Background Geolocation Logs Manual Upload',
level: SentryLevel.info,
withScope: (scope) {
scope.addAttachment(attachment);
},
);
AppGlobal.printLog(
'[BG Geolocation] ✅ Logs uploaded to Sentry. Event ID: $sentryId');
return {'success': true, 'eventId': sentryId.toString()};
} catch (e, stackTrace) {
AppGlobal.printLog(
'[BG Geolocation] ❌ Error uploading logs to Sentry: $e');
await Sentry.captureException(e, stackTrace: stackTrace);
return {'success': false, 'error': e.toString()};
}
}
}
Your code contains no reference to actually executing your method .emailLogs()
/// Send debug logs via email
/// This will open the device's email app with logs attached
Future<Map<String, dynamic>> emailLogs(String emailAddress) async {
if (!isEnabled) {
AppGlobal.printLog(
'[BG Geolocation] ❌ Cannot send logs - plugin disabled');
return {'success': false, 'error': 'Plugin disabled'};
}
AppGlobal.printLog(
'[BG Geolocation] 📧 Preparing to send logs to: $emailAddress');
try {
final success = await Logger.emailLog(
emailAddress, SQLQuery(order: SQLQuery.ORDER_DESC));
if (success) {
AppGlobal.printLog(
'[BG Geolocation] ✅ Email log dialog opened successfully');
return {'success': true, 'message': 'Email client opened'};
} else {
AppGlobal.printLog('[BG Geolocation] ❌ Failed to open email client');
return {'success': false, 'error': 'Failed to open email client'};
}
} catch (e, stackTrace) {
AppGlobal.printLog('[BG Geolocation] ❌ Error sending logs: $e');
await Sentry.captureException(e, stackTrace: stackTrace);
return {'success': false, 'error': e.toString()};
}
}
Yes, I say your method emailLogs. There is nothing in the code you posted that actually INVOKES your method:
BackgroundLocationProService.emailLogs(emailAddress) // <-- an actual invocation of this method does not exist in your posted code
Im using a webview so functions are invoked using javascript.
// Email logs
controller.addJavaScriptHandler(
handlerName: 'backgroundLocationPro.emailLogs',
callback: (args) async {
AppGlobal.printLog('backgroundLocationPro.emailLogs Event');
final String emailAddress =
args.isNotEmpty ? args[0] : '[email protected]';
return await BackgroundLocationProService.instance
.emailLogs(emailAddress);
},
);
// Send logs to Sentry
controller.addJavaScriptHandler(
handlerName: 'backgroundLocationPro.sendLogsToSentry',
callback: (args) async {
AppGlobal.printLog('backgroundLocationPro.sendLogsToSentry Event');
return await BackgroundLocationProService.instance.sendLogsToSentry();
},
);
When using sendLogsToSentry, it sends a file with following error:
Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference
Do not call .emailLog until .ready(config) has resolved.
Execute it in a button click-handler.
I noticed this error:
12-01 16:11:50.003 WARN [unknown null]
⚠️ Attempted to post headless event location but there are no listeners.
12-01 16:11:50.003 ERROR [unknown null] HeadlessTask failed to find com.transistorsoft.flutter.backgroundgeolocation.HeadlessTask.java. If you've configured enableHeadless: true, you must provide a custom BackgroundGeolocationHeadlessTask.java. See Wiki: https://github.com/transistorsoft/cordova-background-geolocation-lt/wiki/Android-Headless-Mode
12-01 16:11:50.003 ERROR [unknown null]
‼️ com.urvan.drivers.BackgroundGeolocationHeadlessTask
I did not see that on the documentation, is still needed? Do you have any instructions for flutter?
Here is my main code
@pragma('vm:entry-point')
void backgroundGeolocationHeadlessTask(HeadlessEvent headlessEvent) async {
// Plugin automatically handles:
// - Recording locations
// - POSTing to configured URL
// - Queueing failed requests
// - Retrying on network restore
// Just log for debugging (optional - can remove in production)
print('[BG Geolocation] Headless: ${headlessEvent.name}');
}
void main() async {
await loadEnvFile();
WidgetsFlutterBinding.ensureInitialized();
// Register headless task for background geolocation
// This allows location tracking to continue even when app is terminated
BackgroundGeolocation.registerHeadlessTask(backgroundGeolocationHeadlessTask);
...
}
HeadlessTask failed to find com.transistorsoft.flutter.backgroundgeolocation.HeadlessTask.java.
You've configured the plugin's http service with an url so you're doing nothing in your headless-task. that warning has no effect upon location-tracking.
Nevertheless, that warning should not occur. Headless setup has not changed in v5. are your logs from a debug or release build? I would suspect your build is from a release and there's a missing proguard-rule, causing that class to be minified/obfuscated, causing Java reflection code to fail finding that classname, since it changed.
Yes its a release builds, with my current setup its hard to test a debug build. Is there an issue with that or can I just simply ignore it?
Why is it hard to test a debug build?
About your original issue, see the api docs GeoConfig.stopTimeout. Also see wiki "Philosophy of Operation".
12-02 11:24:27.153 DEBUG [LifecycleManager onResume] ☯️ onResume
12-02 11:24:27.148 DEBUG [LifecycleManager onStart] ☯️ onStart
12-02 11:24:19.066 DEBUG [t a]
✅ Locked 0 records
12-02 11:24:19.066 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 4
12-02 11:24:19.065 INFO [HttpService$e onResponse]
🔵 Response: 200
12-02 11:24:19.065 DEBUG [t a]
✅ DELETED: (1)
12-02 11:24:18.330 DEBUG [t a]
✅ Locked 1 records
12-02 11:24:18.330 INFO [HttpService a]
🔵 HTTP POST batch (1)
12-02 11:24:18.329 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 4
12-02 11:24:18.300 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════
12-02 11:24:18.299 INFO [t a]
✅ 💾 INSERT: 5a26ac39-4ea6-4173-847c-6a16d02a59ac
12-02 11:24:18.297 INFO [TSLocationManager a]
╔═════════════════════════════════════════════
║ getCurrentPosition LocationResult: 5 (83614ms old)
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -33.403597,-70.588065 hAcc=100.0 et=+15d19h16m37s194ms alt=684.0999755859375 vAcc=100.0], time: 1764685374682
12-02 11:24:18.297 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired current position
12-02 11:24:18.275 DEBUG [g a] ❤️
12-02 11:24:18.269 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: HEARTBEAT in 60000ms (jobID: -1307475748)
12-02 11:24:18.266 INFO [ScheduleEvent a]
╔═════════════════════════════════════════════
║ ⏰ OneShot event fired: HEARTBEAT
╠═════════════════════════════════════════════
12-02 11:24:18.190 DEBUG [HttpService a]
╔═════════════════════════════════════════════
║ 📶 Connectivity change: connected? false
╠═════════════════════════════════════════════
12-02 11:17:27.328 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 3
12-02 11:17:27.327 DEBUG [t a]
✅ DELETED: (1)
12-02 11:17:27.327 DEBUG [t a]
✅ Locked 0 records
12-02 11:17:27.326 INFO [HttpService$e onResponse]
🔵 Response: 200
12-02 11:17:26.588 INFO [HttpService a]
🔵 HTTP POST batch (1)
12-02 11:17:26.587 DEBUG [t a]
✅ Locked 1 records
12-02 11:17:26.585 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 3
12-02 11:17:26.547 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════
12-02 11:17:26.545 INFO [t a]
✅ 💾 INSERT: 6b911bbd-1566-4a34-8b3f-2dfce1336620
12-02 11:17:26.543 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired current position
12-02 11:17:26.541 INFO [TSLocationManager a]
╔═════════════════════════════════════════════
║ getCurrentPosition LocationResult: 4 (23720ms old)
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -33.403597,-70.588065 hAcc=100.0 et=+15d19h10m45s332ms alt=684.0999755859375 vAcc=54.859154], time: 1764685022821
12-02 11:17:26.525 DEBUG [TerminateEvent$a onChange]
ℹ️ TERMINATE_EVENT ignored (MainActivity is still active).
12-02 11:17:26.525 DEBUG [g a] ❤️
12-02 11:17:26.524 INFO [ScheduleEvent a]
╔═════════════════════════════════════════════
║ ⏰ OneShot event fired: TERMINATE_EVENT
╠═════════════════════════════════════════════
12-02 11:17:26.523 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: HEARTBEAT in 60000ms (jobID: -1307475748)
12-02 11:17:26.521 INFO [ScheduleEvent a]
╔═════════════════════════════════════════════
║ ⏰ OneShot event fired: HEARTBEAT
╠═════════════════════════════════════════════
12-02 11:17:09.015 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
12-02 11:17:09.015 DEBUG [LifecycleManager onStop] ☯️ onStop
12-02 11:17:03.028 DEBUG [LifecycleManager onPause] ☯️ onPause
12-02 11:16:41.560 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════
12-02 11:16:40.559 DEBUG [HttpService a]
╔═════════════════════════════════════════════
║ 📶 Connectivity change: connected? true
╠═════════════════════════════════════════════
12-02 11:15:54.926 DEBUG [t a]
✅ Locked 0 records
12-02 11:15:54.926 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 2
12-02 11:15:54.924 DEBUG [t a]
✅ DELETED: (1)
12-02 11:15:54.923 INFO [HttpService$e onResponse]
🔵 Response: 200
12-02 11:15:54.672 DEBUG [TSLocationManagerActivity onDestroy] locationsettings
12-02 11:15:54.664 DEBUG [AbstractService onDestroy]
🔴 TrackingService stopped
12-02 11:15:54.657 DEBUG [AbstractService f]
⚙️︎ TrackingService.stopSelfResult(1): true
12-02 11:15:54.637 DEBUG [TSLocationManagerActivity a] locationsettings
12-02 11:15:54.461 DEBUG [t a]
✅ Locked 1 records
12-02 11:15:54.461 INFO [HttpService a]
🔵 HTTP POST batch (1)
12-02 11:15:54.459 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 2
12-02 11:15:54.448 DEBUG [AbstractService a]
⚙️︎ FINISH [TrackingService startId: 1, eventCount: 0, sticky: false]
12-02 11:15:54.447 INFO [TrackingService l]
╔═════════════════════════════════════════════
║ TrackingService motionchange: false
╠═════════════════════════════════════════════
12-02 11:15:54.446 DEBUG [AbstractService a]
🎾 motionchange [TrackingService startId: 1, eventCount: 1]
12-02 11:15:54.440 DEBUG [TSGeofenceManager startMonitoringStationaryRegion]
🎾 Start monitoring stationary region (radius: 150.0m -33.4035955,-70.5880616 hAcc=100.0)
12-02 11:15:54.435 INFO [t a]
✅ 💾 INSERT: d2f36b73-e23e-4f9b-ae44-35d2faca905a
12-02 11:15:54.435 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════
12-02 11:15:54.432 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired motionchange position, isMoving: false
12-02 11:15:54.431 INFO [TSLocationManager a]
╔═════════════════════════════════════════════
║ motionchange LocationResult: 3 (78326ms old)
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -33.403596,-70.588062 hAcc=100.0 et=+15d19h8m18s617ms alt=684.0999755859375 vAcc=100.0], time: 1764684876105
12-02 11:15:54.431 INFO [TSLocationManager onSingleLocationResult]
🔵 MOTIONCHANGE isMoving=false df=0.0 — resetting short-term filter state
12-02 11:15:54.423 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: HEARTBEAT in 60000ms (jobID: -1307475748)
12-02 11:15:54.422 INFO [g b]
🎾 Start heartbeat (60.0s)
12-02 11:15:54.422 INFO [TSScheduleManager cancelOneShot]
⏰ Cancel OneShot: HEARTBEAT
12-02 11:15:54.421 DEBUG [HttpService startMonitoringConnectivityChanges]
🎾 Start monitoring connectivity changes
12-02 11:15:54.421 DEBUG [DeviceSettings startMonitoringPowerSaveChanges]
🎾 Start monitoring powersave changes
12-02 11:15:54.421 INFO [ActivityRecognitionService d]
🎾 Start motion-activity updates
12-02 11:15:54.420 DEBUG [LocationAuthorization withBackgroundPermission]
ℹ️ LocationAuthorization: Permission granted
12-02 11:15:54.414 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════
12-02 11:15:48.939 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 1
12-02 11:15:48.938 DEBUG [t a]
✅ Locked 0 records
12-02 11:15:48.935 DEBUG [t a]
✅ DELETED: (2)
12-02 11:15:48.934 INFO [HttpService$e onResponse]
🔵 Response: 200
12-02 11:15:48.453 INFO [HttpService flush]
ℹ️ HttpService is busy
12-02 11:15:47.890 DEBUG [TSLocationManagerActivity onDestroy] locationsettings
12-02 11:15:47.709 DEBUG [AbstractService onDestroy]
🔴 TrackingService stopped
12-02 11:15:47.703 DEBUG [AbstractService f]
⚙️︎ TrackingService.stopSelfResult(1): true
12-02 11:15:47.657 DEBUG [TSLocationManagerActivity a] locationsettings
12-02 11:15:47.513 DEBUG [t a]
✅ Locked 2 records
12-02 11:15:47.513 INFO [HttpService a]
🔵 HTTP POST batch (2)
12-02 11:15:47.508 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 1
12-02 11:15:47.501 DEBUG [AbstractService a]
⚙️︎ FINISH [TrackingService startId: 1, eventCount: 0, sticky: false]
12-02 11:15:47.500 INFO [TrackingService l]
╔═════════════════════════════════════════════
║ TrackingService motionchange: false
╠═════════════════════════════════════════════
12-02 11:15:47.499 DEBUG [AbstractService a]
🎾 motionchange [TrackingService startId: 1, eventCount: 1]
12-02 11:15:47.494 DEBUG [TSGeofenceManager startMonitoringStationaryRegion]
🎾 Start monitoring stationary region (radius: 150.0m -33.4035955,-70.5880616 hAcc=100.0)
12-02 11:15:47.493 DEBUG [TSLocationManager$4 onLocation]
ℹ️ Distance from last location: 8218362.0
12-02 11:15:47.493 DEBUG [TSGeofenceManager startMonitoringStationaryRegion]
🎾 Start monitoring stationary region (radius: 150.0m -33.4035955,-70.5880616 hAcc=100.0)
12-02 11:15:47.491 INFO [HttpService flush]
ℹ️ HttpService is busy
12-02 11:15:47.490 INFO [t a]
✅ 💾 INSERT: 5c1b39fe-b198-4b17-a336-7435ca9eb0fb
12-02 11:15:47.489 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired motionchange position, isMoving: false
12-02 11:15:47.488 INFO [TSLocationManager a]
╔═════════════════════════════════════════════
║ motionchange LocationResult: 1 (71383ms old)
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -33.403596,-70.588062 hAcc=100.0 et=+15d19h8m18s617ms alt=684.0999755859375 vAcc=100.0], time: 1764684876105
12-02 11:15:47.488 INFO [TSLocationManager onSingleLocationResult]
🔵 MOTIONCHANGE isMoving=false df=0.0 — resetting short-term filter state
12-02 11:15:47.487 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 1)
╠═════════════════════════════════════════════
12-02 11:15:47.485 INFO [t a]
✅ 💾 INSERT: a0c0640c-6aba-4735-bc6d-fb7665f0c233
12-02 11:15:47.473 INFO [TSLocationManager a]
╔═════════════════════════════════════════════
║ providerchange LocationResult: 2 (71366ms old)
╠═════════════════════════════════════════════
╟─ 📍 Location[fused -33.403596,-70.588062 hAcc=100.0 et=+15d19h8m18s617ms alt=684.0999755859375 vAcc=100.0], time: 1764684876105
12-02 11:15:47.473 INFO [TSLocationManager onSingleLocationResult]
🔵 Acquired providerchange position
12-02 11:15:47.452 DEBUG [LifecycleManager onResume] ☯️ onResume
12-02 11:15:47.452 DEBUG [HttpService a]
╔═════════════════════════════════════════════
║ 📶 Connectivity change: connected? true
╠═════════════════════════════════════════════
12-02 11:15:47.451 DEBUG [TSLocationManagerActivity start] Action 'locationsettings' already pending <IGNORED>
12-02 11:15:47.451 INFO [y a]
╔═════════════════════════════════════════════
║ Location-provider change: true
╠═════════════════════════════════════════════
╟─ GPS: true
╟─ Network: true
╟─ AP Mode: false
12-02 11:15:47.450 DEBUG [TrackingService a]
⚠️ Waiting for existing motionchange request #1 to complete
12-02 11:15:47.449 INFO [TrackingService a]
🔵 setPace: false → false
12-02 11:15:47.447 INFO [g b]
🎾 Start heartbeat (60.0s)
12-02 11:15:47.447 INFO [TSScheduleManager oneShot]
⏰ Scheduled OneShot: HEARTBEAT in 60000ms (jobID: -1307475748)
12-02 11:15:47.446 INFO [ActivityRecognitionService d]
🎾 Start motion-activity updates
12-02 11:15:47.445 DEBUG [HttpService startMonitoringConnectivityChanges]
🎾 Start monitoring connectivity changes
12-02 11:15:47.445 DEBUG [DeviceSettings startMonitoringPowerSaveChanges]
🎾 Start monitoring powersave changes
12-02 11:15:47.443 INFO [TSGeofenceManager start]
🎾 Start monitoring geofences
12-02 11:15:47.439 INFO [LocationAuthorization$PermissionRequestAction onPermissionGranted]
✅ LocationAuthorization: Permission granted
12-02 11:15:47.402 DEBUG [LifecycleManager onStart] ☯️ onStart
12-02 11:15:46.161 DEBUG [LifecycleManager onPause] ☯️ onPause
12-02 11:15:46.161 DEBUG [LifecycleManager onStop] ☯️ onStop
12-02 11:15:43.955 DEBUG [LifecycleManager onResume] ☯️ onResume
12-02 11:15:43.842 INFO [LocationAuthorization d]
🔵 Should show backgroundPermissionRationale? true
12-02 11:15:43.824 INFO [LocationAuthorization$PermissionRequestAction onPermissionGranted]
✅ LocationAuthorization: Permission granted
12-02 11:15:42.839 INFO [g c]
🔴 Stop heartbeat
12-02 11:15:42.839 DEBUG [HttpService stopMonitoringConnectivityChanges]
🔴 Stop monitoring connectivity changes
12-02 11:15:42.838 DEBUG [TSGeofenceManager c]
🔴 Stop monitoring geofences
12-02 11:15:42.838 INFO [ActivityRecognitionService f]
🔴 Stop motion-activity updates
12-02 11:15:42.341 DEBUG [LifecycleManager onPause] ☯️ onPause
12-02 11:15:41.511 INFO [LocationAuthorization withBackgroundPermission]
🔵 LocationAuthorization: Requesting Background permission
12-02 11:15:41.472 INFO [HttpService flush]
╔═════════════════════════════════════════════
║ HTTP Service (count: 0)
╠═════════════════════════════════════════════
12-02 11:15:41.472 DEBUG [a a] NotificationChannel{mId='bggeo', mName=BackgroundGeolocation, mDescription=, mImportance=3, mBypassDnd=false, mLockscreenVisibility=-1, mSound=null, mLights=false, mLightColor=0, mVibrationPattern=null, mVibrationEffect=null, mUserLockedFields=0, mUserVisibleTaskShown=false, mVibrationEnabled=false, mShowBadge=false, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedByOEM=false, mImportanceLockedDefaultApp=false, mOriginalImp=-1000, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false, mLastNotificationUpdateTimeMs=0, mSoundMissingReason=0}
12-02 11:15:10.687 DEBUG [LoggerFacade$a a]
🔴 Cleared callbacks
12-02 11:15:10.687 DEBUG [LoggerFacade$a a] CREATE TABLE IF NOT EXISTS locations (id INTEGER PRIMARY KEY AUTOINCREMENT, uuid TEXT NOT NULL DEFAULT '', timestamp TEXT, json TEXT, data BLOB, encrypted BOOLEAN NOT NULL DEFAULT 0, locked BOOLEAN NOT NULL DEFAULT 0);
12-02 11:15:10.687 DEBUG [LoggerFacade$a a] CREATE TABLE IF NOT EXISTS geofences (id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL UNIQUE, latitude DOUBLE NOT NULL, sin_latitude DOUBLE NOT NULL, cos_latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, sin_longitude DOUBLE NOT NULL, cos_longitude DOUBLE NOT NULL, radius DOUBLE NOT NULL, notifyOnEntry BOOLEAN NOT NULL DEFAULT 0, notifyOnExit BOOLEAN NOT NULL DEFAULT 0, notifyOnDwell BOOLEAN NOT NULL DEFAULT 0, loiteringDelay INTEGER NOT NULL DEFAULT 0, extras TEXT, vertices TEXT, entry_state INTEGER NOT NULL DEFAULT 0, state_updated_at DOUBLE, hits INTEGER NOT NULL DEFAULT 0);
12-02 11:15:10.687 DEBUG [LoggerFacade$a a]
ℹ️ PRUNE -1 days
12-02 11:15:10.686 INFO [LoggerFacade$a a]
✅ Google Play Services: connected (version code:12451000)
12-02 11:15:10.686 DEBUG [TSSQLiteAppender$c run]
ℹ️ Cleared logs older than 72 hours
12-02 11:15:10.686 INFO [LoggerFacade$a a]
╔═════════════════════════════════════════════
║ TSLocationManager version: 4.0.0-beta.9 (4009)
╠═════════════════════════════════════════════
{
"actions": [],
"activity": {
"activityRecognitionInterval": 10,
"disableMotionActivityUpdates": false,
"disableStopDetection": false,
"minimumActivityRecognitionConfidence": 75,
"motionTriggerDelay": 0,
"stopOnStationary": false,
"triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking"
},
"activityRecognitionInterval": 10,
"allowIdenticalLocations": false,
"allowTap": true,
"app": {
"backgroundPermissionRationale": {},
"enableHeadless": false,
"foregroundService": true,
"headlessJobService": "",
"heartbeatInterval": -1,
"mainActivityName": null,
"notification": {
"actions": [],
"allowTap": true,
"channelDescription": "Location tracking",
"channelId": "bggeo",
"channelName": "BackgroundGeolocation",
"color": "",
"importance": 2,
"largeIcon": "",
"layout": "",
"priority": -1,
"smallIcon": "mipmap\/ic_launcher",
"sticky": false,
"strings": {},
"tapActivity": "",
"text": "Tracking location",
"title": "Background Geolocation"
},
"schedule": [],
"scheduleUseAlarmManager": false,
"startOnBoot": false,
"stopOnTerminate": true
},
"authorization": {
"accessToken": "✱✱✱",
"expires": -1,
"refreshHeaders": null,
"refreshPayload": null,
"refreshToken": "✱✱✱",
"refreshUrl": "✱✱✱",
"strategy": "JWT"
},
"autoSync": true,
"autoSyncThreshold": 0,
"backgroundPermissionRationale": {},
"batchSync": false,
"channelDescription": "Location tracking",
"channelId": "bggeo",
"channelName": "BackgroundGeolocation",
"color": "",
"debug": false,
"deferTime": 0,
"desiredAccuracy": 100,
"didDeviceReboot": false,
"didShowBackgroundPermissionRationale": false,
"disableAutoSyncOnCellular": false,
"disableElasticity": false,
"disableLocationAuthorizationAlert": false,
"disableMotionActivityUpdates": false,
"disableProviderChangeRecord": false,
"disableStopDetection": false,
"distanceFilter": 10,
"elasticityMultiplier": 1,
"enableHeadless": false,
"enableTimestampMeta": false,
"enabled": false,
"extras": {},
"fastestLocationUpdateInterval": -1,
"foregroundService": true,
"geofenceInitialTriggerEntry": true,
"geofenceModeHighAccuracy": true,
"geofenceProximityRadius": 1000,
"geofenceTemplate": "",
"geolocation": {
"allowIdenticalLocations": false,
"deferTime": 0,
"desiredAccuracy": 100,
"disableElasticity": false,
"disableLocationAuthorizationAlert": false,
"distanceFilter": 10,
"elasticityMultiplier": 1,
"enableTimestampMeta": false,
"fastestLocationUpdateInterval": -1,
"filter": {
"burstWindow": 10,
"filterDebug": false,
"kalmanDebug": false,
"kalmanProfile": 0,
"maxBurstDistance": 300,
"maxImpliedSpeed": 60,
"odometerAccuracyThreshold": 20,
"odometerUseKalmanFilter": true,
"policy": 2,
"rollingWindow": 5,
"trackingAccuracyThreshold": 100,
"useKalman": true
},
"geofenceInitialTriggerEntry": true,
"geofenceModeHighAccuracy": true,
"geofenceProximityRadius": 1000,
"locationAuthorizationRequest": "Always",
"locationTimeout": 60,
"locationUpdateInterval": 1000,
"stationaryRadius": 150,
"stopAfterElapsedMinutes": 0,
"stopTimeout": 5,
"useCLLocationAccuracy": false,
"useSignificantChangesOnly": false
},
"headers": {},
"headlessJobService": "",
"heartbeatEnabled": false,
"heartbeatInterval": -1,
"http": {
"autoSync": true,
"autoSyncThreshold": 0,
"batchSync": false,
"disableAutoSyncOnCellular": false,
"headers": {},
"maxBatchSize": -1,
"method": "POST",
"params": {},
"rootProperty": "location",
"timeout": 60000,
"url": ""
},
"httpRootProperty": "location",
"httpTimeout": 60000,
"importance": 2,
"isFirstBoot": true,
"isMoving": false,
"largeIcon": "",
"layout": "",
"locationAuthorizationRequest": "Always",
"locationTemplate": "",
"locationTimeout": 60,
"locationUpdateInterval": 1000,
"locationsOrderDirection": "ASC",
"logLevel": 0,
"logMaxDays": 3,
"logger": {
"debug": false,
"logLevel": 0,
"logMaxDays": 3
},
"maxBatchSize": -1,
"maxDaysToPersist": 1,
"maxRecordsToPersist": -1,
"method": "POST",
"minimumActivityRecognitionConfidence": 75,
"motionTriggerDelay": 0,
"notification": {
"actions": [],
"allowTap": true,
"channelDescription": "Location tracking",
"channelId": "bggeo",
"channelName": "BackgroundGeolocation",
"color": "",
"importance": 2,
"largeIcon": "",
"layout": "",
"priority": -1,
"smallIcon": "mipmap\/ic_launcher",
"sticky": false,
"strings": {},
"tapActivity": "",
"text": "Tracking location",
"title": "Background Geolocation"
},
"odometer": 0,
"odometerError": 0,
"params": {},
"persistMode": 2,
"persistence": {
"disableProviderChangeRecord": false,
"extras": {},
"geofenceTemplate": "",
"locationTemplate": "",
"locationsOrderDirection": "ASC",
"maxDaysToPersist": 1,
"maxRecordsToPersist": -1,
"persistMode": 2
},
"priority": -1,
"schedule": [],
"scheduleUseAlarmManager": false,
"schedulerEnabled": false,
"smallIcon": "mipmap\/ic_launcher",
"startOnBoot": false,
"stationaryRadius": 150,
"sticky": false,
"stopAfterElapsedMinutes": 0,
"stopOnStationary": false,
"stopOnTerminate": true,
"stopTimeout": 5,
"strings": {},
"tapActivity": "",
"text": "Tracking location",
"title": "Background Geolocation",
"trackingMode": 1,
"triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
"url": "",
"useCLLocationAccuracy": false,
"useSignificantChangesOnly": false
}
12-02 11:15:10.686 INFO [LoggerFacade$a a]
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅ ACCELEROMETER: {Sensor name="lsm6dsv_0 Accelerometer Non-wakeup", vendor="STMicro", version=15933, type=1, maxRange=156.9064, resolution=0.0047856453, power=0.19, minDelay=5000}
╟─ ✅ GYROSCOPE: {Sensor name="lsm6dsv_0 Gyroscope Non-wakeup", vendor="STMicro", version=15933, type=4, maxRange=34.906036, resolution=0.0012217296, power=0.53, minDelay=5000}
╟─ ✅ MAGNETOMETER: {Sensor name="ak0991x_0 Magnetometer Non-wakeup", vendor="akm", version=146991, type=2, maxRange=4912.0503, resolution=0.15, power=1.1, minDelay=10000}
╟─ ✅ SIGNIFICANT_MOTION: {Sensor name="smd Wakeup", vendor="Samsung", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1}
╚═════════════════════════════════════════════
12-02 11:15:10.686 INFO [LoggerFacade$a a]
🎾 Start monitoring location-provider changes
Do you have a specific question about the latest logs you've posted?