Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not getting any events when app is terminated #252

Closed
gadon1 opened this issue Apr 27, 2020 · 9 comments
Closed

not getting any events when app is terminated #252

gadon1 opened this issue Apr 27, 2020 · 9 comments
Labels
Android Issues related to Android DontKillMyApp Issues related to poor Android OEMs http://dontkillmyapp.com

Comments

@gadon1
Copy link

gadon1 commented Apr 27, 2020

Your Environment

  • Plugin version: ^1.7.3
  • Platform: Android
  • OS version: NRD90M 7.0
  • Device manufacturer / model: Xiaomi Redmi Note 4
  • Flutter info (flutter doctor):
    [√] Flutter (Channel beta, v1.17.0-3.2.pre, on Microsoft Windows [Version 10.0.18362.778], locale he-IL)
    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    [√] Chrome - develop for the web
    [√] Android Studio (version 3.5)
    [√] VS Code
    [√] VS Code, 64-bit edition (version 1.41.1)
    [√] Connected device (3 available)
  • Plugin config:
    bg.Config(
    locationAuthorizationRequest: 'Always',
    locationUpdateInterval: 5000,
    heartbeatInterval: 5,
    desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
    distanceFilter: 10.0,
    stopOnTerminate: false,
    startOnBoot: true,
    debug: true,
    enableHeadless: true,
    logLevel: bg.Config.LOG_LEVEL_VERBOSE)
import 'package:flutter/material.dart';
import 'package:flutter_background_geolocation/flutter_background_geolocation.dart'
    as bg;

void headlessTask(bg.HeadlessEvent headlessEvent) async {
  print('[BackgroundGeolocation HeadlessTask]: $headlessEvent');
  // Implement a 'case' for only those events you're interested in.
  switch (headlessEvent.name) {
    case bg.Event.TERMINATE:
      bg.State state = headlessEvent.event;
      print('- State: $state');
      break;
    case bg.Event.HEARTBEAT:
      bg.HeartbeatEvent event = headlessEvent.event;
      print('- HeartbeatEvent: $event');
      break;
    case bg.Event.LOCATION:
      bg.Location location = headlessEvent.event;
      print('- Location: $location');
      break;
    case bg.Event.MOTIONCHANGE:
      bg.Location location = headlessEvent.event;
      print('- Location: $location');
      break;
    case bg.Event.GEOFENCE:
      bg.GeofenceEvent geofenceEvent = headlessEvent.event;
      print('- GeofenceEvent: $geofenceEvent');
      break;
    case bg.Event.GEOFENCESCHANGE:
      bg.GeofencesChangeEvent event = headlessEvent.event;
      print('- GeofencesChangeEvent: $event');
      break;
    case bg.Event.SCHEDULE:
      bg.State state = headlessEvent.event;
      print('- State: $state');
      break;
    case bg.Event.ACTIVITYCHANGE:
      bg.ActivityChangeEvent event = headlessEvent.event;
      print('ActivityChangeEvent: $event');
      break;
    case bg.Event.HTTP:
      bg.HttpEvent response = headlessEvent.event;
      print('HttpEvent: $response');
      break;
    case bg.Event.POWERSAVECHANGE:
      bool enabled = headlessEvent.event;
      print('ProviderChangeEvent: $enabled');
      break;
    case bg.Event.CONNECTIVITYCHANGE:
      bg.ConnectivityChangeEvent event = headlessEvent.event;
      print('ConnectivityChangeEvent: $event');
      break;
    case bg.Event.ENABLEDCHANGE:
      bool enabled = headlessEvent.event;
      print('EnabledChangeEvent: $enabled');
      break;
  }
}

void main() {
  runApp(MyApp());
  bg.BackgroundGeolocation.registerHeadlessTask(headlessTask)
      .then((value) => print("registered headlessTask: $value"));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  void initState() {
    super.initState();

    ////
    // 1.  Listen to events (See docs for all 12 available events).
    //

    // Fired whenever a location is recorded
    bg.BackgroundGeolocation.onLocation((bg.Location location) {
      print('[location] - $location');
    });

    // Fired whenever the plugin changes motion-state (stationary->moving and vice-versa)
    bg.BackgroundGeolocation.onMotionChange((bg.Location location) {
      print('[motionchange] - $location');
    });

    // Fired whenever the state of location-services changes.  Always fired at boot
    bg.BackgroundGeolocation.onProviderChange((bg.ProviderChangeEvent event) {
      print('[providerchange] - $event');
    });

    ////
    // 2.  Configure the plugin
    //
    bg.BackgroundGeolocation.ready(bg.Config(
            locationAuthorizationRequest: 'Always',
            locationUpdateInterval: 5000,
            heartbeatInterval: 5,
            desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
            distanceFilter: 10.0,
            stopOnTerminate: false,
            startOnBoot: true,
            debug: true,
            enableHeadless: true,
            logLevel: bg.Config.LOG_LEVEL_VERBOSE))
        .then((bg.State state) {
      if (!state.enabled) {
        ////
        // 3.  Start the plugin.
        //
        bg.BackgroundGeolocation.start();
      }
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Container(
          child: Text(
            "Gadon",
          ),
        ),
      ),
    );
  }
}

Expected Behavior

get events in log when app is terminated

Actual Behavior

no events

Steps to Reproduce

  1. run the app
  2. turn on and off location service to get some events in log - works great (foreground & background)
  3. terminate the app
    4.turn on and off location service to get some events in log - none

Context

test location updates (even if app is terminated)

Debug logs

Logs
--------- beginning of main
04-28 02:29:03.392 12425 12425 D TSLocationManager: [c.t.locationmanager.util.b b]
04-28 02:29:03.392 12425 12425 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-28 02:29:03.400 12425 12425 I TSLocationManager: [c.t.l.g.TSGeofenceManager stopMonitoringSignificantLocationChanges]
04-28 02:29:03.400 12425 12425 I TSLocationManager:   �🔴  Stop monitoring significant location changes
04-28 02:29:03.404 12425 12425 I TSLocationManager: [c.t.l.service.HeartbeatService b]
04-28 02:29:03.404 12425 12425 I TSLocationManager:   �🎾  Start heartbeat (5s)
--------- beginning of system
04-28 02:29:03.416 12425 12425 D TSLocationManager: [c.t.locationmanager.util.b b]
04-28 02:29:03.416 12425 12425 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-28 02:29:03.417 12425 12425 I TSLocationManager: [c.t.l.service.TrackingService a]
04-28 02:29:03.417 12425 12425 I TSLocationManager:   �🔵  setPace: false → false
04-28 02:29:03.441 12425 12425 I TSLocationManager: [c.t.l.a.BackgroundGeolocation$h onReceive]
04-28 02:29:03.441 12425 12425 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:03.441 12425 12425 I TSLocationManager: ║ Location-provider change: true
04-28 02:29:03.441 12425 12425 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:03.441 12425 12425 I TSLocationManager: ╟─ GPS: false
04-28 02:29:03.441 12425 12425 I TSLocationManager: ╟─ Network: true
04-28 02:29:03.472 12425 12425 D TSLocationManager: [c.t.l.adapter.TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
04-28 02:29:03.600 12425 12425 D TSLocationManager: [c.t.l.a.TSLocationManagerActivity$1 onComplete]
04-28 02:29:03.600 12425 12425 D TSLocationManager:   ℹ️  Location Settings Resolution: START
04-28 02:29:03.601 12425 12649 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:03.601 12425 12649 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:03.601 12425 12649 I TSLocationManager: ║ providerchange LocationResult: 2
04-28 02:29:03.601 12425 12649 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:03.601 12425 12649 I TSLocationManager: ╟─ �📍  Location[fused 32.076028,34.774407 acc=13 et=+32m6s822ms alt=43.19999694824219 vel=0.002861953 bear=333.5066 {Bundle[mParcelledData.dataSize
2]}], age: 73ms, time: 1588030143527
04-28 02:29:03.641 12425 12649 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
04-28 02:29:03.641 12425 12649 I TSLocationManager:   �🔵  Acquired providerchange position
04-28 02:29:03.642 12425 12649 D TSLocationManager: [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.732
04-28 02:29:03.652 12425 12425 D TSLocationManager: [c.t.l.s.LocationRequestService onDestroy]
04-28 02:29:03.655 12425 12649 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 2 isFinished? true
04-28 02:29:03.674 12425 12680 I TSLocationManager: [c.t.l.data.sqlite.b persist]
04-28 02:29:03.674 12425 12680 I TSLocationManager:   ✅  INSERT: 11511093-5415-404f-a897-661dcf314e7d
04-28 02:29:03.749 12425 12645 I TSLocationManager: [c.t.l.s.LocationRequestService b]
04-28 02:29:03.749 12425 12645 I TSLocationManager:   ℹ️  Location availability: true
04-28 02:29:03.769 12425 12681 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:03.769 12425 12681 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:03.769 12425 12681 I TSLocationManager: ║ motionchange LocationResult: 3
04-28 02:29:03.769 12425 12681 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:03.769 12425 12681 I TSLocationManager: ╟─ �📍  Location[fused 32.076028,34.774407 acc=13 et=+32m7s18ms alt=43.19999694824219 vel=0.002861953 bear=333.5066 {Bundle[mParcelledData.dataSize=
]}], age: 44ms, time: 1588030143723
04-28 02:29:03.779 12425 12681 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
04-28 02:29:03.779 12425 12681 I TSLocationManager:   �🔵  Acquired motionchange position, isMoving: false
04-28 02:29:03.781 12425 12681 D TSLocationManager: [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.706
04-28 02:29:03.795 12425 12425 D TSLocationManager: [c.t.l.s.LocationRequestService onDestroy]
04-28 02:29:03.811 12425 12681 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 3 isFinished? true
04-28 02:29:03.811 12425 12425 I TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-28 02:29:03.811 12425 12425 I TSLocationManager:   �🎾  Start motion-activity updates
04-28 02:29:03.822 12425 12425 D TSLocationManager: [c.t.l.g.TSGeofenceManager startMonitoringStationaryRegion]
04-28 02:29:03.822 12425 12425 D TSLocationManager:   �🎾  Start monitoring stationary region (radius: 150.0m 32.076028,34.7744065 hAcc=12.706)
04-28 02:29:03.822 12425 12645 I TSLocationManager: [c.t.l.data.sqlite.b persist]
04-28 02:29:03.822 12425 12645 I TSLocationManager:   ✅  INSERT: 6b504aec-d0e3-4bee-be04-9c9282524035
04-28 02:29:03.872 12425 12425 I TSLocationManager: [c.t.l.service.TrackingService h] 
04-28 02:29:03.872 12425 12425 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:03.872 12425 12425 I TSLocationManager: ║ TrackingService motionchange: false
04-28 02:29:03.872 12425 12425 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:03.940 12425 12425 D TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-28 02:29:03.940 12425 12425 D TSLocationManager:   �🚘 ️DetectedActivity [type=STILL, confidence=100]
04-28 02:29:04.136 12425 12425 D TSLocationManager: [c.t.l.service.TrackingService onDestroy]
04-28 02:29:04.136 12425 12425 D TSLocationManager:   �🔴  TrackingService destroyed
04-28 02:29:04.950 12425 12425 D TSLocationManager: [c.t.l.s.ActivityRecognitionService onDestroy]
04-28 02:29:04.950 12425 12425 D TSLocationManager:   �🔴  ActivityRecognitionService destroyed
04-28 02:29:05.506 12425 12425 D TSLocationManager: [c.t.locationmanager.util.b b]
04-28 02:29:05.506 12425 12425 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-28 02:29:05.526 12425 12425 I TSLocationManager: [c.t.l.g.TSGeofenceManager stopMonitoringSignificantLocationChanges] 
04-28 02:29:05.526 12425 12425 I TSLocationManager:   �🔴  Stop monitoring significant location changes
04-28 02:29:05.530 12425 12425 I TSLocationManager: [c.t.l.service.HeartbeatService b] 
04-28 02:29:05.530 12425 12425 I TSLocationManager:   �🎾  Start heartbeat (5s)
04-28 02:29:05.550 12425 12425 D TSLocationManager: [c.t.locationmanager.util.b b]
04-28 02:29:05.550 12425 12425 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-28 02:29:05.551 12425 12425 I TSLocationManager: [c.t.l.service.TrackingService a]
04-28 02:29:05.551 12425 12425 I TSLocationManager:   �🔵  setPace: false → false
04-28 02:29:05.579 12425 12425 I TSLocationManager: [c.t.l.a.BackgroundGeolocation$h onReceive]
04-28 02:29:05.579 12425 12425 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:05.579 12425 12425 I TSLocationManager: ║ Location-provider change: true
04-28 02:29:05.579 12425 12425 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:05.579 12425 12425 I TSLocationManager: ╟─ GPS: true
04-28 02:29:05.579 12425 12425 I TSLocationManager: ╟─ Network: true
04-28 02:29:05.657 12425 12425 D TSLocationManager: [c.t.l.a.TSLocationManagerActivity onActivityResult] 
04-28 02:29:05.657 12425 12425 D TSLocationManager:   ✅  Location settings resolution: ACCEPTED
04-28 02:29:05.742 12425 12425 I TSLocationManager: [c.t.l.s.TSScheduleManager oneShot]
04-28 02:29:05.742 12425 12425 I TSLocationManager:   ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
04-28 02:29:05.770 12425 12643 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:05.770 12425 12643 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:05.770 12425 12643 I TSLocationManager: ║ motionchange LocationResult: 5
04-28 02:29:05.770 12425 12643 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:05.770 12425 12643 I TSLocationManager: ╟─ �📍  Location[fused 32.076028,34.774407 acc=13 et=+32m9s37ms alt=43.19999694824219 vel=0.002861953 bear=333.5066 {Bundle[mParcelledData.dataSize=
]}], age: 27ms, time: 1588030145742
04-28 02:29:05.774 12425 12643 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult] 
04-28 02:29:05.774 12425 12643 I TSLocationManager:   �🎾  Acquired motionchange position, isMoving: false
04-28 02:29:05.774 12425 12643 D TSLocationManager: [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.706
04-28 02:29:05.775 12425 12681 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:05.775 12425 12681 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:05.775 12425 12681 I TSLocationManager: ║ providerchange LocationResult: 4
04-28 02:29:05.775 12425 12681 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:05.775 12425 12681 I TSLocationManager: ╟─ �📍  Location[fused 32.076028,34.774407 acc=13 et=+32m9s37ms alt=43.19999694824219 vel=0.002861953 bear=333.5066 {Bundle[mParcelledData.dataSize=
]}], age: 32ms, time: 1588030145742
04-28 02:29:05.781 12425 12425 D TSLocationManager: [c.t.l.s.LocationRequestService onDestroy]
04-28 02:29:05.824 12425 12649 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:05.824 12425 12649 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:05.824 12425 12649 I TSLocationManager: ║ motionchange LocationResult: 5
04-28 02:29:05.824 12425 12649 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:05.824 12425 12649 I TSLocationManager: ╟─ �📍  Location[fused 32.076028,34.774407 acc=13 et=+32m9s93ms alt=43.19999694824219 vel=0.002861953 bear=333.5066 {Bundle[mParcelledData.dataSize=
]}], age: 24ms, time: 1588030145798
04-28 02:29:05.824 12425 12649 W TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:05.824 12425 12649 W TSLocationManager:   ⚠️  Failed to find SingleLocationRequest: 5
04-28 02:29:05.840 12425 12731 I TSLocationManager: [c.t.l.s.LocationRequestService a] 
04-28 02:29:05.840 12425 12731 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:05.840 12425 12731 I TSLocationManager: ║ providerchange LocationResult: 4
04-28 02:29:05.840 12425 12731 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:05.840 12425 12731 I TSLocationManager: ╟─ �📍  Location[fused 32.076028,34.774407 acc=13 et=+32m9s93ms alt=43.19999694824219 vel=0.002861953 bear=333.5066 {Bundle[mParcelledData.dataSize=
]}], age: 39ms, time: 1588030145798
04-28 02:29:05.867 12425 12425 I TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-28 02:29:05.867 12425 12425 I TSLocationManager:   �🔵  Start motion-activity updates
04-28 02:29:05.867 12425 12643 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 5 isFinished? true
04-28 02:29:05.869 12425 12425 D TSLocationManager: [c.t.l.g.TSGeofenceManager startMonitoringStationaryRegion]
04-28 02:29:05.869 12425 12425 D TSLocationManager:   �📍  Start monitoring stationary region (radius: 150.0m 32.076028,34.7744065 hAcc=12.706)
04-28 02:29:05.870 12425 12680 I TSLocationManager: [c.t.l.data.sqlite.b persist]
04-28 02:29:05.870 12425 12680 I TSLocationManager:   ✅  INSERT: cbc96df0-ed9a-4c1c-8669-ed4acfa4a573
04-28 02:29:05.879 12425 12681 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
04-28 02:29:05.879 12425 12681 I TSLocationManager:   �🚘  Acquired providerchange position
04-28 02:29:05.889 12425 12425 I TSLocationManager: [c.t.l.service.TrackingService h]
04-28 02:29:05.889 12425 12425 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:05.889 12425 12425 I TSLocationManager: ║ TrackingService motionchange: false
04-28 02:29:05.889 12425 12425 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:05.902 12425 12681 D TSLocationManager: [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.706
04-28 02:29:05.904 12425 12680 I TSLocationManager: [c.t.l.s.LocationRequestService b]
04-28 02:29:05.904 12425 12680 I TSLocationManager:   ℹ️  Location availability: true
04-28 02:29:05.911 12425 12681 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 4 isFinished? true
04-28 02:29:05.911 12425 12731 W TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
04-28 02:29:05.911 12425 12731 W TSLocationManager:   ⚠️  Failed to find SingleLocationRequest
04-28 02:29:05.929 12425 12425 D TSLocationManager: [c.t.l.s.LocationRequestService onDestroy] 
04-28 02:29:05.932 12425 12691 I TSLocationManager: [c.t.l.data.sqlite.b persist]
04-28 02:29:05.932 12425 12691 I TSLocationManager:   ✅  INSERT: a244b25a-5a15-4de4-827b-58ef37cccb4a
04-28 02:29:05.935 12425 12731 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 4 isFinished? true
04-28 02:29:06.005 12425 12425 D TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-28 02:29:06.005 12425 12425 D TSLocationManager:   �🔵 ️DetectedActivity [type=STILL, confidence=100]
04-28 02:29:06.144 12425 12425 D TSLocationManager: [c.t.l.service.TrackingService onDestroy]
04-28 02:29:06.144 12425 12425 D TSLocationManager:   �🔴  TrackingService destroyed
04-28 02:29:07.012 12425 12425 D TSLocationManager: [c.t.l.s.ActivityRecognitionService onDestroy] 
04-28 02:29:07.012 12425 12425 D TSLocationManager:   �🔴  ActivityRecognitionService destroyed
04-28 02:29:10.374 12425 12425 I TSLocationManager: [c.t.l.s.TSScheduleManager oneShot]
04-28 02:29:10.374 12425 12425 I TSLocationManager:   ⏰ Oneshot TERMINATE_EVENT is already pending
04-28 02:29:12.990 12425 12425 D TSLocationManager: [c.t.locationmanager.util.b b]
04-28 02:29:12.990 12425 12425 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-28 02:29:13.015 12425 12425 I TSLocationManager: [c.t.l.g.TSGeofenceManager stopMonitoringSignificantLocationChanges]
04-28 02:29:13.015 12425 12425 I TSLocationManager:   �🔴  Stop monitoring significant location changes
04-28 02:29:13.030 12425 12425 I TSLocationManager: [c.t.l.service.HeartbeatService b]
04-28 02:29:13.030 12425 12425 I TSLocationManager:   �🎾  Start heartbeat (5s)
04-28 02:29:13.077 12425 12425 D TSLocationManager: [c.t.locationmanager.util.b b]
04-28 02:29:13.077 12425 12425 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-28 02:29:13.082 12425 12425 I TSLocationManager: [c.t.l.service.TrackingService a]
04-28 02:29:13.082 12425 12425 I TSLocationManager:   �🎾  setPace: false → false
04-28 02:29:13.089 12425 12425 I TSLocationManager: [c.t.l.a.BackgroundGeolocation$h onReceive]
04-28 02:29:13.089 12425 12425 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:13.089 12425 12425 I TSLocationManager: ║ Location-provider change: true
04-28 02:29:13.089 12425 12425 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:13.089 12425 12425 I TSLocationManager: ╟─ GPS: false
04-28 02:29:13.089 12425 12425 I TSLocationManager: ╟─ Network: true
04-28 02:29:13.184 12425 12745 I TSLocationManager: [c.t.l.s.LocationRequestService a] 
04-28 02:29:13.184 12425 12745 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:13.184 12425 12745 I TSLocationManager: ║ motionchange LocationResult: 7
04-28 02:29:13.184 12425 12745 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:13.184 12425 12745 I TSLocationManager: ╟─ �📍  Location[fused 32.076025,34.774418 acc=12 et=+32m16s449ms alt=43.19999694824219 {Bundle[mParcelledData.dataSize=52]}], age: 28ms, time: 1588
0153154
04-28 02:29:13.188 12425 12745 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
04-28 02:29:13.188 12425 12745 I TSLocationManager:   �🔴  Acquired motionchange position, isMoving: false
04-28 02:29:13.189 12425 12745 D TSLocationManager: [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.706
04-28 02:29:13.193 12425 12649 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:13.193 12425 12649 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:13.193 12425 12649 I TSLocationManager: ║ providerchange LocationResult: 6
04-28 02:29:13.193 12425 12649 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:13.193 12425 12649 I TSLocationManager: ╟─ �📍  Location[fused 32.076025,34.774418 acc=12 et=+32m16s449ms alt=43.19999694824219 {Bundle[mParcelledData.dataSize=52]}], age: 38ms, time: 1588
0153154
04-28 02:29:13.235 12425 12425 D TSLocationManager: [c.t.l.s.LocationRequestService onDestroy]
04-28 02:29:13.260 12425 12746 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:13.260 12425 12746 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:13.260 12425 12746 I TSLocationManager: ║ motionchange LocationResult: 7
04-28 02:29:13.260 12425 12746 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:13.260 12425 12746 I TSLocationManager: ╟─ �📍  Location[fused 32.076025,34.774418 acc=12 et=+32m16s511ms alt=43.19999694824219 {Bundle[mParcelledData.dataSize=52]}], age: 43ms, time: 1588
0153216
04-28 02:29:13.261 12425 12746 W TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:13.261 12425 12746 W TSLocationManager:   ⚠️  Failed to find SingleLocationRequest: 7
04-28 02:29:13.286 12425 12745 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 7 isFinished? true
04-28 02:29:13.288 12425 12740 I TSLocationManager: [c.t.l.data.sqlite.b persist]
04-28 02:29:13.288 12425 12740 I TSLocationManager:   ✅  INSERT: f524fd90-2674-496c-b0a2-025692247351
04-28 02:29:13.291 12425 12649 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
04-28 02:29:13.291 12425 12649 I TSLocationManager:   �🔴  Acquired providerchange position
04-28 02:29:13.292 12425 12649 D TSLocationManager: [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.706
04-28 02:29:13.292 12425 12425 I TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-28 02:29:13.292 12425 12425 I TSLocationManager:   �🎾  Start motion-activity updates
04-28 02:29:13.294 12425 12680 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:13.294 12425 12680 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:13.294 12425 12680 I TSLocationManager: ║ providerchange LocationResult: 6
04-28 02:29:13.294 12425 12680 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:13.294 12425 12680 I TSLocationManager: ╟─ �📍  Location[fused 32.076025,34.774418 acc=12 et=+32m16s511ms alt=43.19999694824219 {Bundle[mParcelledData.dataSize=52]}], age: 70ms, time: 1588
0153216
04-28 02:29:13.294 12425 12680 W TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:13.294 12425 12680 W TSLocationManager:   ⚠️  Failed to find SingleLocationRequest: 6
04-28 02:29:13.296 12425 12649 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 6 isFinished? true
04-28 02:29:13.300 12425 12643 I TSLocationManager: [c.t.l.data.sqlite.b persist]
04-28 02:29:13.300 12425 12643 I TSLocationManager:   ✅  INSERT: 101e1627-1503-40d0-9b06-5b7a85d8922e
04-28 02:29:13.300 12425 12425 D TSLocationManager: [c.t.l.g.TSGeofenceManager startMonitoringStationaryRegion]
04-28 02:29:13.300 12425 12425 D TSLocationManager:   �🔴  Start monitoring stationary region (radius: 150.0m 32.0760248,34.774418 hAcc=11.806)
04-28 02:29:13.375 12425 12425 I TSLocationManager: [c.t.l.service.TrackingService h] 
04-28 02:29:13.375 12425 12425 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:13.375 12425 12425 I TSLocationManager: ║ TrackingService motionchange: false
04-28 02:29:13.375 12425 12425 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:13.397 12425 12425 D TSLocationManager: [c.t.l.s.ActivityRecognitionService a] 
04-28 02:29:13.397 12425 12425 D TSLocationManager:   �🔴 ️DetectedActivity [type=STILL, confidence=100]
04-28 02:29:13.419 12425 12649 I TSLocationManager: [c.t.l.s.LocationRequestService b]
04-28 02:29:13.419 12425 12649 I TSLocationManager:   ℹ️  Location availability: true
04-28 02:29:13.551 12425 12425 D TSLocationManager: [c.t.l.s.LocationRequestService onDestroy]
04-28 02:29:13.632 12425 12425 D TSLocationManager: [c.t.l.service.TrackingService onDestroy]
04-28 02:29:13.632 12425 12425 D TSLocationManager:   �🎾  TrackingService destroyed
04-28 02:29:14.412 12425 12425 D TSLocationManager: [c.t.l.s.ActivityRecognitionService onDestroy]
04-28 02:29:14.412 12425 12425 D TSLocationManager:   �🔵  ActivityRecognitionService destroyed
04-28 02:29:15.195 12425 12425 D TSLocationManager: [c.t.locationmanager.util.b b]
04-28 02:29:15.195 12425 12425 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-28 02:29:15.223 12425 12425 I TSLocationManager: [c.t.l.g.TSGeofenceManager stopMonitoringSignificantLocationChanges]
04-28 02:29:15.223 12425 12425 I TSLocationManager:   �🔵  Stop monitoring significant location changes
04-28 02:29:15.232 12425 12425 I TSLocationManager: [c.t.l.service.HeartbeatService b]
04-28 02:29:15.232 12425 12425 I TSLocationManager:   �🔴  Start heartbeat (5s)
04-28 02:29:15.290 12425 12425 D TSLocationManager: [c.t.locationmanager.util.b b]
04-28 02:29:15.290 12425 12425 D TSLocationManager:   ℹ️  LocationAuthorization: Permission granted
04-28 02:29:15.291 12425 12425 I TSLocationManager: [c.t.l.service.TrackingService a]
04-28 02:29:15.291 12425 12425 I TSLocationManager:   �📍  setPace: false → false
04-28 02:29:15.298 12425 12425 I TSLocationManager: [c.t.l.a.BackgroundGeolocation$h onReceive]
04-28 02:29:15.298 12425 12425 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:15.298 12425 12425 I TSLocationManager: ║ Location-provider change: true
04-28 02:29:15.298 12425 12425 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:15.298 12425 12425 I TSLocationManager: ╟─ GPS: true
04-28 02:29:15.298 12425 12425 I TSLocationManager: ╟─ Network: true
04-28 02:29:15.389 12425 12644 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:15.389 12425 12644 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:15.389 12425 12644 I TSLocationManager: ║ motionchange LocationResult: 9
04-28 02:29:15.389 12425 12644 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:15.389 12425 12644 I TSLocationManager: ╟─ �📍  Location[fused 32.076025,34.774418 acc=12 et=+32m18s650ms alt=43.19999694824219 {Bundle[mParcelledData.dataSize=52]}], age: 32ms, time: 1588
0155355
04-28 02:29:15.393 12425 12644 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
04-28 02:29:15.393 12425 12644 I TSLocationManager:   �🔵  Acquired motionchange position, isMoving: false
04-28 02:29:15.397 12425 12644 D TSLocationManager: [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.706
04-28 02:29:15.397 12425 12736 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:15.397 12425 12736 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:15.397 12425 12736 I TSLocationManager: ║ providerchange LocationResult: 8
04-28 02:29:15.397 12425 12736 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:15.397 12425 12736 I TSLocationManager: ╟─ �📍  Location[fused 32.076025,34.774418 acc=12 et=+32m18s650ms alt=43.19999694824219 {Bundle[mParcelledData.dataSize=52]}], age: 40ms, time: 1588
0155355
04-28 02:29:15.411 12425 12644 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 9 isFinished? true
04-28 02:29:15.414 12425 12736 I TSLocationManager: [c.t.l.l.TSLocationManager onSingleLocationResult]
04-28 02:29:15.414 12425 12736 I TSLocationManager:   �🔴  Acquired providerchange position
04-28 02:29:15.415 12425 12736 D TSLocationManager: [c.t.l.l.TSLocationManager calculateMedianAccuracy] Median accuracy: 12.706
04-28 02:29:15.420 12425 12649 I TSLocationManager: [c.t.l.data.sqlite.b persist]
04-28 02:29:15.420 12425 12649 I TSLocationManager:   ✅  INSERT: 78f19f11-a981-4bcb-be1c-0a2b7213d1b0
04-28 02:29:15.423 12425 12736 D TSLocationManager: [c.t.l.s.LocationRequestService a] SingleLocationRequest 8 isFinished? true
04-28 02:29:15.434 12425 12739 I TSLocationManager: [c.t.l.data.sqlite.b persist]
04-28 02:29:15.434 12425 12739 I TSLocationManager:   ✅  INSERT: b7b5258a-9b6d-42c1-a807-07227dbb1efe
04-28 02:29:15.481 12425 12425 I TSLocationManager: [c.t.l.s.ActivityRecognitionService a] 
04-28 02:29:15.481 12425 12425 I TSLocationManager:   �🔵  Start motion-activity updates
04-28 02:29:15.482 12425 12730 I TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:15.482 12425 12730 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:15.482 12425 12730 I TSLocationManager: ║ motionchange LocationResult: 9
04-28 02:29:15.482 12425 12730 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:15.482 12425 12730 I TSLocationManager: ╟─ �📍  Location[fused 32.076025,34.774418 acc=12 et=+32m18s698ms alt=43.19999694824219 {Bundle[mParcelledData.dataSize=52]}], age: 78ms, time: 1588
0155403
04-28 02:29:15.483 12425 12730 W TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:15.483 12425 12730 W TSLocationManager:   ⚠️  Failed to find SingleLocationRequest: 9
04-28 02:29:15.488 12425 12425 D TSLocationManager: [c.t.l.g.TSGeofenceManager startMonitoringStationaryRegion]
04-28 02:29:15.488 12425 12425 D TSLocationManager:   �📍  Start monitoring stationary region (radius: 150.0m 32.0760248,34.774418 hAcc=11.806)
04-28 02:29:15.509 12425 12644 I TSLocationManager: [c.t.l.s.LocationRequestService a] 
04-28 02:29:15.509 12425 12644 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:15.509 12425 12644 I TSLocationManager: ║ providerchange LocationResult: 8
04-28 02:29:15.509 12425 12644 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:15.509 12425 12644 I TSLocationManager: ╟─ �📍  Location[fused 32.076025,34.774418 acc=12 et=+32m18s698ms alt=43.19999694824219 {Bundle[mParcelledData.dataSize=52]}], age: 105ms, time: 158
30155403
04-28 02:29:15.510 12425 12644 W TSLocationManager: [c.t.l.s.LocationRequestService a]
04-28 02:29:15.510 12425 12644 W TSLocationManager:   ⚠️  Failed to find SingleLocationRequest: 8
04-28 02:29:15.575 12425 12425 D TSLocationManager: [c.t.l.s.ActivityRecognitionService a]
04-28 02:29:15.575 12425 12425 D TSLocationManager:   �🎾 ️DetectedActivity [type=STILL, confidence=100]
04-28 02:29:15.602 12425 12425 I TSLocationManager: [c.t.l.service.TrackingService h]
04-28 02:29:15.602 12425 12425 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:15.602 12425 12425 I TSLocationManager: ║ TrackingService motionchange: false
04-28 02:29:15.602 12425 12425 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:15.764 12425 12425 D TSLocationManager: [c.t.l.s.LocationRequestService onDestroy]
04-28 02:29:15.783 12425 12649 I TSLocationManager: [c.t.l.scheduler.ScheduleEvent onOneShot]
04-28 02:29:15.783 12425 12649 I TSLocationManager: ╔═════════════════════════════════════════════
04-28 02:29:15.783 12425 12649 I TSLocationManager: ║ ⏰ OneShot event fired: TERMINATE_EVENT
04-28 02:29:15.783 12425 12649 I TSLocationManager: ╠═════════════════════════════════════════════
04-28 02:29:15.789 12425 12649 D TSLocationManager: [c.t.l.event.TerminateEvent <init>]
04-28 02:29:15.789 12425 12649 D TSLocationManager:   ℹ️  TERMINATE_EVENT ignored (MainActivity is still active).
04-28 02:29:15.858 12425 12425 D TSLocationManager: [c.t.l.service.TrackingService onDestroy]
04-28 02:29:15.858 12425 12425 D TSLocationManager:   �📍  TrackingService destroyed
04-28 02:29:16.591 12425 12425 D TSLocationManager: [c.t.l.s.ActivityRecognitionService onDestroy] 
04-28 02:29:16.591 12425 12425 D TSLocationManager:   �🔴  ActivityRecognitionService destroyed
04-28 02:29:20.283 12425 12730 D TSLocationManager: [c.t.l.s.HeartbeatService$a run] ❤️
04-28 02:29:20.612 12425 12425 D TSLocationManager: [c.t.l.service.HeartbeatService onDestroy] onDestroy
@christocracy
Copy link
Member

christocracy commented Apr 28, 2020

Have you read the Wiki "Philosophy of Operation"? You know you have to move for the device to begin tracking?

@gadon1
Copy link
Author

gadon1 commented Apr 28, 2020

yes.

[updates]

  • after i reopened the app and terminate it again i've started to get headless heartbeat events.
  • after reboot device events stopped.

so if i refine my issue its:

  1. not getting HeadlessEvents on first clean debug run (install), only if i reopen the app
    (tested it few times)
  2. [more important] after reboot HeadlessEvents not starting

any suggestions?

@gadon1 gadon1 closed this as completed Apr 28, 2020
@gadon1 gadon1 reopened this Apr 28, 2020
@christocracy
Copy link
Member

Are you going outside for a nice walk around the block?

@gadon1
Copy link
Author

gadon1 commented Apr 28, 2020

no :) if it's the right way to test it i'll make it happen.

besides the heartbeat events i also get connectivity events when i turn off/on my wifi.
i guessed it would be a good test. am i wrong?

@christocracy
Copy link
Member

Go outside for a walk.

@gadon1
Copy link
Author

gadon1 commented Apr 28, 2020

ok :) thanks for your quick response and patience.

@gadon1
Copy link
Author

gadon1 commented Apr 28, 2020

after device reboot i went on a walk.
when i got back - logcat has no indication of events

@christocracy
Copy link
Member

See http://dontkillmyapp.com

@gadon1
Copy link
Author

gadon1 commented Apr 28, 2020

finally :)

@gadon1 gadon1 closed this as completed Apr 28, 2020
@christocracy christocracy added Android Issues related to Android DontKillMyApp Issues related to poor Android OEMs http://dontkillmyapp.com labels Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues related to Android DontKillMyApp Issues related to poor Android OEMs http://dontkillmyapp.com
Projects
None yet
Development

No branches or pull requests

2 participants