Skip to content

[Help Wanted]: Recieve location even when app is destroyed in background #1529

@fleettrack-dev

Description

@fleettrack-dev

Required Reading

  • Confirmed

Plugin Version

"4.8.1"

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

Redmi

Device operating-systems(s)

Android 10

What do you require assistance about?

Need to get the Location from the device even after the app is destroyed in release mode.

Once i destroy my application that run in release mode. i got following error. and I also attached the logs that i got from logcat.

How can i resolve my issue.

[Optional] Plugin Code and/or Config

In android manifest file i had added the license key also.

* main():


Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await initMyFirebase();
  await FastCachedImageConfig.init(clearCacheAfter: const Duration(hours: MyConst.fleettrackLogoCacheResetHrs));
  await _initBackgroundGeolocation();
  bg.BackgroundGeolocation.registerHeadlessTask(backgroundGeolocationHeadlessTask);
  BackgroundFetch.registerHeadlessTask(backgroundFetchHeadlessTask);
  MediaKit.ensureInitialized();

  runApp(const MyApp());
}


* headless functions:

@pragma('vm:entry-point')
void backgroundGeolocationHeadlessTask(bg.HeadlessEvent headlessEvent) async {
  print('📬 --> $headlessEvent');
  switch (headlessEvent.name) {
    case bg.Event.LOCATION:
      bg.Location location = headlessEvent.event;
      if (!location.sample) {
        await sendLocationToServer(location);
      }
      break;
    case bg.Event.HEARTBEAT:
      {
        bg.Location location =
            await bg.BackgroundGeolocation.getCurrentPosition(samples: 2, timeout: 10, extras: {"event": "heartbeat", "headless": true});
        debugPrint('[getCurrentPosition] Headless: $location');
      }
      break;
  }
}

@pragma('vm:entry-point')
void backgroundFetchHeadlessTask(HeadlessTask task) async {
  String taskId = task.taskId;

  if (task.timeout) {
    debugPrint("[BackgroundFetch] HeadlessTask TIMEOUT: $taskId");
    BackgroundFetch.finish(taskId);
    return;
  }

  debugPrint("[BackgroundFetch] HeadlessTask: $taskId");

  try {
    var location = await bg.BackgroundGeolocation.getCurrentPosition(samples: 2, extras: {"event": "background-fetch", "headless": true});
    debugPrint("[location] $location");
  } catch (error) {
    debugPrint("[location] ERROR: $error");
  }
  int count = 0;
  int fetchCount = await IO.getSavedDataOrNull("fetch-count");
  if (fetchCount != null) {
    count = fetchCount;
  }
  await IO.saveData("fetch-count", ++count);
  debugPrint('[BackgroundFetch] count: $count');
  BackgroundFetch.finish(taskId);
}

Future<void> _initBackgroundGeolocation() async {
  bool isGranted = await Permission.ignoreBatteryOptimizations.isGranted;
  if (!isGranted)
    await Permission.ignoreBatteryOptimizations.request();
}

The above codes where in `main.dart` file.


Future<void> sendLocationToServer(bg.Location location, {User? user}) async {
  print(location);
  String deviceId;
  deviceId = await IO.getSavedString("mobile_deviceId");
  if (isNull(deviceId)) deviceId = "ph_${user?.phoneArray?[0]}";
  GpsData gpsData = GpsData();
  gpsData.lat = location.coords.latitude;
  gpsData.lon = location.coords.longitude;
  gpsData.bearing = location.coords.heading;
  gpsData.deviceSpeed = location.coords.speed.toString();
  gpsData.deviceId = deviceId;
  gpsData.gpsDate = DateTime.parse(location.timestamp).toUtc().toIso8601String();
  gpsData.source = "mobileTracking";
  if (gpsData.deviceId == null) return;

  try {
    var res = await IO.postToUrl(
      url: MyConst.relayServerAPIUrl,
      input: {
        'userId': MyConst.relayServerCredUserId,
        'password': MyConst.relayServerCredPassword,
        'gpsArray': [gpsData]
      },
    );
    BaseResponse baseResponse = BaseResponse.fromJson(res.data);
    if (baseResponse.isSuccess) {
      print(baseResponse.message);
    }
  } catch (e) {
    print('Error sending location: $e');
  }
}


The above function is used to send the location to server.

I had done my config in another file.


void _configureBackgroundGeolocation() {
    bg.BackgroundGeolocation.destroyLocations();
    bg.BackgroundGeolocation.ready(bg.Config(
      desiredAccuracy: isIos() ? bg.Config.DESIRED_ACCURACY_NAVIGATION : bg.Config.DESIRED_ACCURACY_HIGH,
      disableElasticity: true,
      stopOnTerminate: false,
      startOnBoot: true,
      foregroundService: true,
      debug: true,
      logLevel: bg.Config.LOG_LEVEL_VERBOSE,
      heartbeatInterval: 60,
      enableHeadless: true,
      notification: bg.Notification(
        title: "Location Tracker",
        text: "Tracking your location in the background",
        channelName: "Background Location",
        sticky: true,
        priority: bg.Config.NOTIFICATION_PRIORITY_HIGH,
        // actions: ["stop"] // have a listener on background to open the application usning deep links.
      ),
      autoSync: true,
      autoSyncThreshold: 1,
      maxDaysToPersist: 7,
      pausesLocationUpdatesAutomatically: false,
      disableLocationAuthorizationAlert: true,
      locationAuthorizationRequest: 'Always',
      backgroundPermissionRationale: bg.PermissionRationale(
          title: "Allow background location access",
          message: "This app requires background location tracking to work properly",
          positiveAction: "Change to Always Allow",
          negativeAction: "Cancel"),
    )).then((bg.State state) {
      debugPrint("bg ready");
      debugPrint(state.toString());
    });

    bg.BackgroundGeolocation.onHeartbeat((bg.HeartbeatEvent event) {
      bg.BackgroundGeolocation.getCurrentPosition().then((bg.Location location) {
        debugPrint(location.toString());
      });
    });
    bg.BackgroundGeolocation.onLocation(_onLocation);
  }

  Future<void> _onLocation(bg.Location location) async {
    if (!location.sample) {
      await sendLocationToServer(location,user: user);
    }
  }

[Optional] Relevant log output

* output:

I/flutter ( 8656): Data Sent successfully.
D/FlutterGeolocator( 8656): Flutter engine disconnected. Connected engine count 1
E/FlutterGeolocator( 8656): Geolocator position updates stopped
E/FlutterGeolocator( 8656): There is still another flutter engine connected, not stopping location service
D/FlutterGeolocator( 8656): Flutter engine connected. Connected engine count 2
E/flutter ( 8656): [ERROR:flutter/shell/common/shell.cc(117)] Dart Error: Dart_LookupLibrary: library 'package:flutter_background_geolocation/flutter_background_geolocation.dart' not found.
E/flutter ( 8656): [ERROR:flutter/runtime/dart_isolate.cc(862)] Could not resolve main entrypoint function.
E/flutter ( 8656): [ERROR:flutter/runtime/dart_isolate.cc(171)] Could not run the run main Dart entrypoint.
E/flutter ( 8656): [ERROR:flutter/runtime/runtime_controller.cc(549)] Could not create root isolate.
E/flutter ( 8656): [ERROR:flutter/shell/common/shell.cc(690)] Could not launch engine with configuration.


* log output:

2025-07-15 16:00:49.679  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService start] 
                                                                                                      🎾  LocationRequestService [eventCount: 1]
2025-07-15 16:00:49.680  8656-11551 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.s.LocationRequestService handleLocationResult] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ getCurrentPosition LocationResult: 6
                                                                                                    ╠═════════════════════════════════════════════
                                                                                                    ╟─ 📍  Location[fused 13.024150,77.642653 hAcc=25 et=+56d22h39m10s473ms alt=821.0999755859375 vel=0.17015204 bear=196.33603 vAcc=1 sAcc=2 bAcc=45 {Bundle[mParcelledData.dataSize=896]}], age: 22ms, time: 1752575449656
2025-07-15 16:00:49.690  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
2025-07-15 16:00:49.694  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService onDestroy] 
                                                                                                      🔴  LocationRequestService stopped
2025-07-15 16:00:49.713  8656-11551 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.l.TSLocationManager onSingleLocationResult] 
                                                                                                      🔵  Acquired current position
2025-07-15 16:00:49.713  8656-11551 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 11.787
2025-07-15 16:00:49.717  8656-11551 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.s.LocationRequestService handleLocationResult] SingleLocationRequest 6 isFinished? true
2025-07-15 16:00:49.718  8656-11551 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
2025-07-15 16:00:49.722  8656-11520 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.data.sqlite.b persist] 
                                                                                                      ✅  INSERT: 8b82fcdf-265f-407c-8f82-83886764dbc1
2025-07-15 16:00:49.783  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:00:49.825  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:01:03.295  8656-8656  TSLocationManager       in.gpstrack.lite                     I  [c.t.l.s.TSScheduleManager oneShot] 
                                                                                                      ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
2025-07-15 16:01:03.557  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.l.LifecycleManager onPause] ☯️  onPause
2025-07-15 16:01:03.558  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.l.LifecycleManager onStop] ☯️  onStop
2025-07-15 16:01:13.302  8656-11520 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.scheduler.ScheduleEvent onOneShot] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ ⏰ OneShot event fired: TERMINATE_EVENT
                                                                                                    ╠═════════════════════════════════════════════
2025-07-15 16:01:13.303  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.event.TerminateEvent$a a] 
                                                                                                      ℹ️  TERMINATE_EVENT ignored (MainActivity is still active).
2025-07-15 16:01:37.760  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService start] 
                                                                                                      🎾  HeartbeatService [eventCount: 1]
2025-07-15 16:01:37.760  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.s.HeartbeatService$a run] ❤️
2025-07-15 16:01:37.783  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish HeartbeatService [eventCount: 0, sticky: false]
2025-07-15 16:01:37.788  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.locationmanager.util.c h] 
                                                                                                      ℹ️  LocationAuthorization: Permission granted
2025-07-15 16:01:37.801  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService start] 
                                                                                                      🎾  LocationRequestService [eventCount: 1]
2025-07-15 16:01:37.802  8656-11520 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.l.SingleLocationRequest startUpdatingLocation] 
                                                                                                      🔵  [SingleLocationRequest start, action: 2, requestId: 7]
2025-07-15 16:01:37.803  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: true]
2025-07-15 16:01:37.827  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService start] 
                                                                                                      🎾  LocationRequestService [eventCount: 1]
2025-07-15 16:01:37.828  8656-11520 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.s.LocationRequestService handleLocationAvailability] 
                                                                                                      ℹ️  Location availability: false
2025-07-15 16:01:37.829  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: true]
2025-07-15 16:01:37.863  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:01:37.885  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:01:37.935  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:01:37.939  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:01:37.952  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:01:38.036  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService onDestroy] 
                                                                                                      🔴  HeartbeatService stopped
2025-07-15 16:01:39.555  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService start] 
                                                                                                      🎾  LocationRequestService [eventCount: 1]
2025-07-15 16:01:39.556  8656-11520 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.s.LocationRequestService handleLocationAvailability] 
                                                                                                      ℹ️  Location availability: true
2025-07-15 16:01:39.557  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: true]
2025-07-15 16:01:39.569  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService start] 
                                                                                                      🎾  LocationRequestService [eventCount: 1]
2025-07-15 16:01:39.570  8656-11520 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.s.LocationRequestService handleLocationResult] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ getCurrentPosition LocationResult: 7
                                                                                                    ╠═════════════════════════════════════════════
                                                                                                    ╟─ 📍  Location[fused 13.024172,77.642660 hAcc=13 et=+56d22h39m58s955ms alt=821.5 vAcc=1 sAcc=2 bAcc=45 {Bundle[mParcelledData.dataSize=848]}], age: 1431ms, time: 1752575498138
2025-07-15 16:01:39.577  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
2025-07-15 16:01:39.580  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService onDestroy] 
                                                                                                      🔴  LocationRequestService stopped
2025-07-15 16:01:39.603  8656-11520 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.l.TSLocationManager onSingleLocationResult] 
                                                                                                      🔵  Acquired current position
2025-07-15 16:01:39.604  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.4505005
2025-07-15 16:01:39.610  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.s.LocationRequestService handleLocationResult] SingleLocationRequest 7 isFinished? true
2025-07-15 16:01:39.610  8656-11551 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.data.sqlite.b persist] 
                                                                                                      ✅  INSERT: e8c105e8-652b-4cd9-b611-04ef3be9bef0
2025-07-15 16:01:39.613  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
2025-07-15 16:01:39.657  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:01:39.703  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:01:39.706  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:02:00.835  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: location
2025-07-15 16:02:00.836  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: motionchange
2025-07-15 16:02:00.838  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: activitychange
2025-07-15 16:02:00.840  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: geofence
2025-07-15 16:02:00.842  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: heartbeat
2025-07-15 16:02:00.844  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: http
2025-07-15 16:02:00.846  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: schedule
2025-07-15 16:02:00.848  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: connectivitychange
2025-07-15 16:02:00.850  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: enabledchange
2025-07-15 16:02:00.852  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: providerchange
2025-07-15 16:02:00.853  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: powersavechange
2025-07-15 16:02:00.856  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation removeListener] 
                                                                                                      ✅  removeListener event: notificationaction
2025-07-15 16:02:00.861  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.l.LifecycleManager a] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ ☯️  HeadlessMode? true
                                                                                                    ╠═════════════════════════════════════════════
2025-07-15 16:02:00.864  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.f.b.HeadlessTask onHeadlessEvent] 💀 [HeadlessTask terminate]
2025-07-15 16:02:00.866  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.a.BackgroundGeolocation b] 
                                                                                                      🔴  Cleared callbacks
2025-07-15 16:02:00.867  8656-11520 TSLocationManager       in.gpstrack.lite                     I  [c.t.l.a.BackgroundGeolocation$l0 run] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ MainActivity was destroyed
                                                                                                    ╠═════════════════════════════════════════════
                                                                                                    ╟─ stopOnTerminate: false
                                                                                                    ╟─ enabled: true
2025-07-15 16:02:00.960  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.f.b.HeadlessTask dispatch] [HeadlessTask] waiting for client to initialize
2025-07-15 16:02:37.762  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService start] 
                                                                                                      🎾  HeartbeatService [eventCount: 1]
2025-07-15 16:02:37.762  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.s.HeartbeatService$a run] ❤️
2025-07-15 16:02:37.785  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.f.b.HeadlessTask onHeadlessEvent] 💀 [HeadlessTask heartbeat]
2025-07-15 16:02:37.786  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.f.b.HeadlessTask dispatch] [HeadlessTask] waiting for client to initialize
2025-07-15 16:02:37.787  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish HeartbeatService [eventCount: 0, sticky: false]
2025-07-15 16:02:37.864  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:02:37.891  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:02:38.041  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService onDestroy] 
                                                                                                      🔴  HeartbeatService stopped
2025-07-15 16:03:37.762  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService start] 
                                                                                                      🎾  HeartbeatService [eventCount: 1]
2025-07-15 16:03:37.762  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.s.HeartbeatService$a run] ❤️
2025-07-15 16:03:37.784  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.f.b.HeadlessTask onHeadlessEvent] 💀 [HeadlessTask heartbeat]
2025-07-15 16:03:37.785  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.f.b.HeadlessTask dispatch] [HeadlessTask] waiting for client to initialize
2025-07-15 16:03:37.786  8656-11520 TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService finish] ⚙️︎  finish HeartbeatService [eventCount: 0, sticky: false]
2025-07-15 16:03:37.865  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:03:37.872  2162-2162  StatusBar               com.android.systemui                 D  updateNotification old=StatusBarNotification(pkg=in.gpstrack.lite user=UserHandle{0} id=9942585 tag=null key=0|in.gpstrack.lite|9942585|null|10493: Notification(channel=in.gpstrack.liteTSLocationManager pri=1 contentView=null vibrate=null sound=null defaults=0x0 flags=0x6a color=0x00000000 vis=PRIVATE))
                                                                                                        pkgName=in.gpstrack.lite appUid=10493 sdk=35 imp=2 sysApp=F priApp=F hasShown=F float=F keyguard=F peek=F fullscreen=F
                                                                                                        showMiuiAction=F enableFloat=T enableKeyguard=T floatTime=5000 messageCount=1 persistent=F customHeight=F customHideBorder=F
2025-07-15 16:03:38.039  8656-8656  TSLocationManager       in.gpstrack.lite                     D  [c.t.l.service.AbstractService onDestroy] 
                                                                                                      🔴  HeartbeatService stopped

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions