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

Background Geolocation only works at when first triggered then goes dormant #2248

Open
121Unicorns opened this issue Jan 14, 2025 · 3 comments

Comments

@121Unicorns
Copy link

The application starts, there's a burst of activity from the library, onLocation registers updates, but there no http updates. After 3-6 location logs, the library goes completely silent and no records are logged or pushed to the endpoint. OnLocation, onMotionChange and onHttp record nothing. The only thing that works is the heartbeat. Another burst of location data is triggered if the user toggles the location on their device, then the library goes silent again. The results are the same, on the emulator with simulated route movement and on a physical device with actual movement.

Your Environment

  • Plugin version: 4.18.3
  • Platform: Android
  • OS version: 13
  • Device manufacturer / model: Samsung A515F
  • React Native version (react-native -v): 0.74.5
  • Plugin config
    BackgroundGeolocation.ready({
      locationAuthorizationRequest: "Always",
      backgroundPermissionRationale: {
        title:
          "Allow access to this device's location in the background?",
        message:
          "This app accesses your location in order to assign and track shipment deliveries.",
        positiveAction: 'Change to "Allow all the time"',
        negativeAction: "Cancel",
      },
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
      debug: false,
      enableHeadless: true,
      logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
      stopOnTerminate: false,
      startOnBoot: true,
      preventSuspend: true,
      disableStopDetection: true,
      pausesLocationUpdatesAutomatically: false,
      allowIdenticalLocations: false,
      showsBackgroundLocationIndicator: true,
      heartbeatInterval: 120,
      foregroundService: true,
      url: "https://myurl.com/locationsbatch",
      locationTemplate:
        '{"lat":<%= latitude %>,"lng":<%= longitude %>,"speed":<%= speed %>,"timestamp":"<%= timestamp %>"}',
      autoSync: true,
      autoSyncThreshold: 10,
      batchSync: true,
      maxBatchSize: 20,
      headers: {
        "Content-Type": "application/json",
        Authorization: `Basic ${auth}`,
      },
      params: {
        driverID: userSub
      },
      maxDaysToPersist: 3,
    }).then(async (state) => {
      BackgroundGeolocation.start(function () {
        console.log("- Start success");
      });

      console.log(
        "- BackgroundGeolocation is configured and ready: ",
        state.enabled,
      );
    });

Expected Behavior

When location tracking starts, updates to the provided http url shuld continue until location tracking is stopped, even when the application is backgrounded.

Actual Behavior

When location tracking starts, there is only an initial burst of locations and a few http updates before the library goes dormant. The library repeats locations with the same timestamps when it starts logging sending http updates. Only toggling the location on the device triggers a burst of accurate logging before the library goes dormant again.

Steps to Reproduce

  1. Run the application on an android device
  2. Grant always permission
  3. Turn on location
  4. Observe

Context

I was trying to send batch location updates to my endpoint in the foreground and the background.

Debug logs

Logs
                                                                                                      ℹ️  LocationAuthorization: Permission granted
2025-01-14 13:50:21.917 29913-30648 TSLocationManager       com.go                   I  - Enable: false → true, trackingMode: 1
2025-01-14 13:50:21.921 29913-30648 TSLocationManager       com.go                   I  [c.t.l.g.TSGeofenceManager start] 
                                                                                                      🎾  Start monitoring geofences
2025-01-14 13:50:21.928 29913-30648 TSLocationManager       com.go                   D  [c.t.l.http.HttpService startMonitoringConnectivityChanges] 
                                                                                                      🎾  Start monitoring connectivity changes
2025-01-14 13:50:21.935 29913-30648 TSLocationManager       com.go                   D  [c.t.l.device.DeviceSettings startMonitoringPowerSaveChanges] 
                                                                                                      🎾  Start monitoring powersave changes
2025-01-14 13:50:21.943 29913-30648 TSLocationManager       com.go                   I  [c.t.l.s.ActivityRecognitionService start] 
                                                                                                      🎾  Start motion-activity updates
2025-01-14 13:50:21.952 29913-30648 TSLocationManager       com.go                   I  [c.t.l.service.HeartbeatService stop] 
                                                                                                      🔴  Stop heartbeat
2025-01-14 13:50:21.955 29913-30134 TSLocationManager       com.go                   D  [c.t.l.http.HttpService a] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ 📶  Connectivity change: connected? true
                                                                                                    ╠═════════════════════════════════════════════
2025-01-14 13:50:21.957 29913-30648 TSLocationManager       com.go                   I  [c.t.l.service.TrackingService changePace] 
                                                                                                      🔵  setPace: false → false
2025-01-14 13:50:21.985 29913-29913 TSLocationManager       com.go                   I  [c.t.l.l.TSLocationManager a] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ motionchange LocationResult: 4 (135873ms old)
                                                                                                    ╠═════════════════════════════════════════════
                                                                                                    ╟─ 📍  Location[fused -1.211439,36.884813 hAcc=72.9 et=+11d6h18m55s706ms alt=1612.9000244140625 vAcc=83.326584 vel=0.0 sAcc=1.5], time: 1736851686111
2025-01-14 13:50:22.049 29913-29913 TSLocationManager       com.go                   D  [c.t.l.l.TSLocationManager a] Median accuracy: 72.9
2025-01-14 13:50:22.054 29913-29913 TSLocationManager       com.go                   D  [c.t.l.u.LocationAuthorization withPermission] 
                                                                                                      ℹ️  LocationAuthorization: Permission granted
2025-01-14 13:50:22.106 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      🎾  start [LocationRequestService  startId: 1, eventCount: 1]
2025-01-14 13:50:22.108 29913-30648 TSLocationManager       com.go                   I  [c.t.l.l.SingleLocationRequest startUpdatingLocation] 
                                                                                                      🔵  [SingleLocationRequest start, action: 1, requestId: 4]
2025-01-14 13:50:22.114 29913-30648 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      ⚙️︎   FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: true]
2025-01-14 13:50:22.171 29913-29913 TSLocationManager       com.go                   I  [c.t.l.s.TSScheduleManager oneShot] 
                                                                                                      ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
2025-01-14 13:50:22.213 29913-29913 TSLocationManager       com.go                   D  [c.t.l.a.TSLocationManagerActivity a] locationsettings
2025-01-14 13:50:22.214 29913-29913 TSLocationManager       com.go                   D  [c.t.l.adapter.TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2
2025-01-14 13:50:22.247 29913-29913 InsetsController        com.go                   D  onStateChanged: InsetsState: {mDisplayFrame=Rect(0, 0 - 1080, 2400), mDisplayCutout=DisplayCutout{insets=Rect(0, 88 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(512, 0 - 568, 88), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=1080 displayHeight=2400 physicalDisplayWidth=1080 physicalDisplayHeight=2400 density={2.625} cutoutSpec={M 0,0 M 0,12.25101276465640 a 10.60613009248640,10.60613009248640 0 1,0 0,21.21226018497290 a 10.60613009248640,10.60613009248640 0 1,0 0,-21.21226018497290 Z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=84, center=Point(84, 84)}, RoundedCorner{position=TopRight, radius=84, center=Point(996, 84)}, RoundedCorner{position=BottomRight, radius=84, center=Point(996, 2316)}, RoundedCorner{position=BottomLeft, radius=84, center=Point(84, 2316)}]}  mRoundedCornerFrame=Rect(0, 0 - 1080, 2400), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(964, 0 - 1080, 88) rotation=0}, mSources= { InsetsSource: {mType=ITYPE_STATUS_BAR, mFrame=[0,0][1080,88], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_NAVIGATION_BAR, mFrame=[0,2274][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_LEFT_GESTURES, mFrame=[0,0][0,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_RIGHT_GESTURES, mFrame=[1080,0][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_TOP_MANDATORY_GESTURES, mFrame=[0,0][1080,120], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_BOTTOM_MANDATORY_GESTURES, mFrame=[0,2274][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_LEFT_DISPLAY_CUTOUT, mFrame=[0,0][-100000,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_TOP_DISPLAY_CUTOUT, mFrame=[0,0][1080,88], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_RIGHT_DISPLAY_CUTOUT, mFrame=[100000,0][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_BOTTOM_DISPLAY_CUTOUT, mFrame=[0,100000][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_TOP_TAPPABLE_ELEMENT, mFrame=[0,0][1080,88], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_BOTTOM_TAPPABLE_ELEMENT, mFrame=[0,2274][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false} } host=com.go/com.transistorsoft.locationmanager.activity.TSLocationManagerActivity from=android.view.ViewRootImpl.setView:1732
2025-01-14 13:50:22.254 29913-29913 ViewRootIm...rActivity] com.go                   I  setView = com.android.internal.policy.DecorView@19d7de3 TM=true
2025-01-14 13:50:22.258 29913-29913 MSHandlerLifeCycle      com.go                   I  removeMultiSplitHandler: no exist. decor=DecorView@19d7de3[TSLocationManagerActivity]
2025-01-14 13:50:22.265 29913-29913 ViewRootIm...rActivity] com.go                   I  performTraversals params={(0,0)(wrapxwrap) sim={adjust=pan forwardNavigation} ty=BASE_APPLICATION fmt=TRANSPARENT
                                                                                                      fl=1800000
                                                                                                      pfl=42000000
                                                                                                      bhv=DEFAULT
                                                                                                      fitTypes=STATUS_BARS NAVIGATION_BARS CAPTION_BAR naviIconColor=0
                                                                                                      sfl=100000}
2025-01-14 13:50:22.267 29913-29913 ViewRootIm...rActivity] com.go                   I  performTraversals mFirst=true windowShouldResize=false viewVisibilityChanged=false mForceNextWindowRelayout=false params={(0,0)(wrapxwrap) sim={adjust=pan forwardNavigation} ty=BASE_APPLICATION fmt=TRANSPARENT
                                                                                                      fl=1800000
                                                                                                      pfl=42000000
                                                                                                      bhv=DEFAULT
                                                                                                      fitTypes=STATUS_BARS NAVIGATION_BARS CAPTION_BAR naviIconColor=0
                                                                                                      sfl=100000}
2025-01-14 13:50:22.283 29913-29913 InsetsController        com.go                   D  onStateChanged: InsetsState: {mDisplayFrame=Rect(0, 0 - 1080, 2400), mDisplayCutout=DisplayCutout{insets=Rect(0, 88 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(512, 0 - 568, 88), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=1080 displayHeight=2400 physicalDisplayWidth=1080 physicalDisplayHeight=2400 density={2.625} cutoutSpec={M 0,0 M 0,12.25101276465640 a 10.60613009248640,10.60613009248640 0 1,0 0,21.21226018497290 a 10.60613009248640,10.60613009248640 0 1,0 0,-21.21226018497290 Z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=84, center=Point(84, 84)}, RoundedCorner{position=TopRight, radius=84, center=Point(996, 84)}, RoundedCorner{position=BottomRight, radius=84, center=Point(996, 2316)}, RoundedCorner{position=BottomLeft, radius=84, center=Point(84, 2316)}]}  mRoundedCornerFrame=Rect(0, 0 - 1080, 2400), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(964, 0 - 1080, 88) rotation=0}, mSources= { InsetsSource: {mType=ITYPE_STATUS_BAR, mFrame=[0,0][1080,88], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_NAVIGATION_BAR, mFrame=[0,2274][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_LEFT_GESTURES, mFrame=[0,0][0,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_RIGHT_GESTURES, mFrame=[1080,0][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_TOP_MANDATORY_GESTURES, mFrame=[0,0][1080,120], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_BOTTOM_MANDATORY_GESTURES, mFrame=[0,2274][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_LEFT_DISPLAY_CUTOUT, mFrame=[0,0][-100000,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_TOP_DISPLAY_CUTOUT, mFrame=[0,0][1080,88], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_RIGHT_DISPLAY_CUTOUT, mFrame=[100000,0][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_BOTTOM_DISPLAY_CUTOUT, mFrame=[0,100000][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_TOP_TAPPABLE_ELEMENT, mFrame=[0,0][1080,88], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_BOTTOM_TAPPABLE_ELEMENT, mFrame=[0,2274][1080,2400], mVisible=true, mInsetsRoundedCornerFrame=false}, InsetsSource: {mType=ITYPE_IME, mFrame=[0,0][0,0], mVisibleFrame=[0,2274][1080,2400], mVisible=false, mInsetsRoundedCornerFrame=false} } host=com.go/com.transistorsoft.locationmanager.activity.TSLocationManagerActivity from=android.view.ViewRootImpl.relayoutWindow:9802
2025-01-14 13:50:22.286 29913-29913 ViewRootIm...rActivity] com.go                   I  updateBlastSurfaceIfNeeded mBlastBufferQueue=null isSameSurfaceControl=false
2025-01-14 13:50:22.287 29913-29913 BLASTBufferQueue        com.go                   I  new BLASTBufferQueue, mName= ViewRootImpl@9b45a0e[TSLocationManagerActivity] mNativeObject= 0x7b38c77000 sc.mNativeObject= 0x7953dc4520 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:2909 android.view.ViewRootImpl.relayoutWindow:9847 android.view.ViewRootImpl.performTraversals:3884 android.view.ViewRootImpl.doTraversal:3116 android.view.ViewRootImpl$TraversalRunnable.run:10885 android.view.Choreographer$CallbackRecord.run:1301 android.view.Choreographer$CallbackRecord.run:1309 android.view.Choreographer.doCallbacks:923 android.view.Choreographer.doFrame:852 android.view.Choreographer$FrameDisplayEventReceiver.run:1283 
2025-01-14 13:50:22.287 29913-29913 BLASTBufferQueue        com.go                   I  update, w= 1 h= 1 mName = ViewRootImpl@9b45a0e[TSLocationManagerActivity] mNativeObject= 0x7b38c77000 sc.mNativeObject= 0x7953dc4520 format= -2 caller= android.graphics.BLASTBufferQueue.<init>:84 android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:2909 android.view.ViewRootImpl.relayoutWindow:9847 android.view.ViewRootImpl.performTraversals:3884 android.view.ViewRootImpl.doTraversal:3116 android.view.ViewRootImpl$TraversalRunnable.run:10885 
2025-01-14 13:50:22.288 29913-29913 ViewRootIm...rActivity] com.go                   I  Relayout returned: old=(0,88,1080,2274) new=(540,1181,540,1181) req=(0,0)0 dur=19 res=0x3 s={true 0x79545f0800} ch=true seqId=0
2025-01-14 13:50:22.289 29913-29913 ViewRootIm...rActivity] com.go                   I  mThreadedRenderer.initialize() mSurface={isValid=true 0x79545f0800} hwInitialized=true
2025-01-14 13:50:22.292 29913-29913 ViewRootIm...rActivity] com.go                   I  reportNextDraw android.view.ViewRootImpl.performTraversals:4438 android.view.ViewRootImpl.doTraversal:3116 android.view.ViewRootImpl$TraversalRunnable.run:10885 android.view.Choreographer$CallbackRecord.run:1301 android.view.Choreographer$CallbackRecord.run:1309 
2025-01-14 13:50:22.293 29913-29913 ViewRootIm...rActivity] com.go                   I  Setup new sync id=0
2025-01-14 13:50:22.293 29913-29913 ViewRootIm...rActivity] com.go                   I  Setting syncFrameCallback
2025-01-14 13:50:22.293 29913-29913 ViewRootIm...rActivity] com.go                   I  registerCallbacksForSync syncBuffer=false
2025-01-14 13:50:22.294 29913-29913 ViewRootIm...rActivity] com.go                   I  onSyncComplete
2025-01-14 13:50:22.295 29913-29913 ViewRootIm...rActivity] com.go                   I  setupSync seqId=0 mSyncId=0 fn=0 caller=android.view.ViewRootImpl$$ExternalSyntheticLambda11.accept:6 android.window.SurfaceSyncer.lambda$setupSync$1$android-window-SurfaceSyncer:128 android.window.SurfaceSyncer$$ExternalSyntheticLambda1.accept:8 android.window.SurfaceSyncer$SyncSet.checkIfSyncIsComplete:382 android.window.SurfaceSyncer$SyncSet.markSyncReady:359 android.window.SurfaceSyncer.markSyncReady:151 android.view.ViewRootImpl.performTraversals:4503 
2025-01-14 13:50:22.295 29913-29913 ViewRootIm...rActivity] com.go                   I  reportDrawFinished seqId=0 mSyncId=-1 fn=0 mSurfaceChangedTransaction=0x7afa7e6d00
2025-01-14 13:50:22.362 29913-29913 ViewRootIm...rActivity] com.go                   I  MSG_WINDOW_FOCUS_CHANGED 0 0
2025-01-14 13:50:22.382 29913-29913 ViewRootIm...rActivity] com.go                   I  MSG_WINDOW_FOCUS_CHANGED 0 0
2025-01-14 13:50:22.639 29913-29913 ViewRootIm...rActivity] com.go                   I  handleAppVisibility mAppVisible = true visible = false
2025-01-14 13:50:22.640 29913-29913 ViewRootIm...rActivity] com.go                   I  stopped(true) old = false
2025-01-14 13:50:22.640 29913-29913 ViewRootIm...rActivity] com.go                   I  WindowStopped on com.go/com.transistorsoft.locationmanager.activity.TSLocationManagerActivity set to true
2025-01-14 13:50:22.650 29913-29913 MSHandlerLifeCycle      com.go                   I  removeMultiSplitHandler: no exist. decor=DecorView@19d7de3[TSLocationManagerActivity]
2025-01-14 13:50:22.652 29913-29913 TSLocationManager       com.go                   D  [c.t.l.a.TSLocationManagerActivity onDestroy] locationsettings
2025-01-14 13:50:22.653 29913-29913 MSHandlerLifeCycle      com.go                   I  removeMultiSplitHandler: no exist. decor=DecorView@19d7de3[TSLocationManagerActivity]
2025-01-14 13:50:22.656 29913-29913 ViewRootIm...rActivity] com.go                   I  dispatchDetachedFromWindow
2025-01-14 13:50:22.957 29913-30648 TSLocationManager       com.go                   I  [c.t.l.http.HttpService flush] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ HTTP Service (count: 0)
                                                                                                    ╠═════════════════════════════════════════════
2025-01-14 13:50:24.652 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      🎾  1:4 [LocationRequestService  startId: 2, eventCount: 1]
2025-01-14 13:50:24.656 29913-30648 TSLocationManager       com.go                   I  [c.t.l.l.TSLocationManager a] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ motionchange LocationResult: 4 (98ms old)
                                                                                                    ╠═════════════════════════════════════════════
                                                                                                    ╟─ 📍  Location[fused -1.211407,36.884737 hAcc=77.6 et=+11d6h21m14s150ms alt=1597.5 vAcc=12.377604], time: 1736851824555
2025-01-14 13:50:24.731 29913-30648 TSLocationManager       com.go                   D  [c.t.l.l.TSLocationManager a] Median accuracy: 72.9
2025-01-14 13:50:24.745 29913-30648 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      ⚙️︎   FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: true]
2025-01-14 13:50:29.576 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      🎾  1:4 [LocationRequestService  startId: 3, eventCount: 1]
2025-01-14 13:50:29.578 29913-30648 TSLocationManager       com.go                   I  [c.t.l.s.LocationRequestService b] 
                                                                                                      ℹ️  Location availability: false
2025-01-14 13:50:29.579 29913-30648 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      ⚙️︎   FINISH [LocationRequestService startId: 3, eventCount: 0, sticky: true]
2025-01-14 13:50:32.196 29913-30648 TSLocationManager       com.go                   I  [c.t.l.scheduler.ScheduleEvent a] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ ⏰ OneShot event fired: TERMINATE_EVENT
                                                                                                    ╠═════════════════════════════════════════════
2025-01-14 13:50:32.199 29913-30648 TSLocationManager       com.go                   D  [c.t.l.event.TerminateEvent$a onChange] 
                                                                                                      ℹ️  TERMINATE_EVENT ignored (MainActivity is still active).
2025-01-14 13:50:32.298 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      🎾  1:4 [LocationRequestService  startId: 4, eventCount: 1]
2025-01-14 13:50:32.302 29913-30648 TSLocationManager       com.go                   I  [c.t.l.s.LocationRequestService b] 
                                                                                                      ℹ️  Location availability: true
2025-01-14 13:50:32.302 29913-30648 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      ⚙️︎   FINISH [LocationRequestService startId: 4, eventCount: 1, sticky: true]
2025-01-14 13:50:32.307 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      🎾  1:4 [LocationRequestService  startId: 5, eventCount: 1]
2025-01-14 13:50:32.312 29913-30648 TSLocationManager       com.go                   I  [c.t.l.l.TSLocationManager a] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ motionchange LocationResult: 4 (5082ms old)
                                                                                                    ╠═════════════════════════════════════════════
                                                                                                    ╟─ 📍  Location[fused -1.211407,36.884737 hAcc=79.604 et=+11d6h21m16s823ms alt=1597.5 vAcc=12.377604 vel=0.0 sAcc=1.5], time: 1736851827228
2025-01-14 13:50:32.318 29913-30648 TSLocationManager       com.go                   I  [c.t.l.l.TSLocationManager onSingleLocationResult] 
                                                                                                      🔵  Acquired motionchange position, isMoving: false
2025-01-14 13:50:32.319 29913-30648 TSLocationManager       com.go                   D  [c.t.l.l.TSLocationManager a] Median accuracy: 72.9
2025-01-14 13:50:32.351 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService b] 
                                                                                                      🎾  STOP [LocationRequestService startId: 6, eventCount: 2]
2025-01-14 13:50:32.351 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      ⚙️︎   FINISH [LocationRequestService startId: 6, eventCount: 1, sticky: false]
2025-01-14 13:50:32.414 29913-29913 TSLocationManager       com.go                   D  [c.t.l.g.TSGeofenceManager startMonitoringStationaryRegion] 
                                                                                                      🎾  Start monitoring stationary region (radius: 150.0m -1.211407,36.8847369 hAcc=79.604)
2025-01-14 13:50:32.414 29913-30648 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      ⚙️︎   FINISH [LocationRequestService startId: 5, eventCount: 0, sticky: false]
2025-01-14 13:50:32.421 29913-30649 TSLocationManager       com.go                   I  [c.t.l.d.s.SQLiteLocationDAO persist] 
                                                                                                      ✅  INSERT: 379ec1d8-a48a-4c7b-a325-2b037362a2c2
2025-01-14 13:50:32.428 29913-30649 TSLocationManager       com.go                   I  [c.t.l.http.HttpService flush] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ HTTP Service (count: 1)
                                                                                                    ╠═════════════════════════════════════════════
2025-01-14 13:50:32.443 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      🎾  motionchange [TrackingService  startId: 1, eventCount: 1]
2025-01-14 13:50:32.444 29913-29913 TSLocationManager       com.go                   I  [c.t.l.service.TrackingService k] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ TrackingService motionchange: false
                                                                                                    ╠═════════════════════════════════════════════
2025-01-14 13:50:32.454 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      ⚙️︎   FINISH [TrackingService startId: 1, eventCount: 0, sticky: false]
2025-01-14 13:50:32.519 29913-29913 TSLocationManager       com.go                   I  [c.t.l.u.BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 2
2025-01-14 13:50:32.525 29913-30649 TSLocationManager       com.go                   D  [c.t.l.d.s.SQLiteLocationDAO first] 
                                                                                                      ✅  Locked 1 records
2025-01-14 13:50:32.525 29913-30649 TSLocationManager       com.go                   I  [c.t.l.http.HttpService a] 
                                                                                                      🔵  HTTP POST: 379ec1d8-a48a-4c7b-a325-2b037362a2c2
2025-01-14 13:50:32.551 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      🎾  start [ActivityRecognitionService  startId: 1, eventCount: 1]
2025-01-14 13:50:32.556 29913-30649 TSLocationManager       com.go                   D  [c.t.l.s.ActivityRecognitionService a] 
                                                                                                      🚘 ️DetectedActivity [type=STILL, confidence=100]
2025-01-14 13:50:32.568 29913-30649 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService a] 
                                                                                                      ⚙️︎   FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false]
2025-01-14 13:50:32.621 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService f] 
                                                                                                      ⚙️︎  LocationRequestService.stopSelfResult(6): true
2025-01-14 13:50:32.623 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService onDestroy] 
                                                                                                      🔴  LocationRequestService stopped
2025-01-14 13:50:32.659 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService f] 
                                                                                                      ⚙️︎  TrackingService.stopSelfResult(1): true
2025-01-14 13:50:32.661 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService onDestroy] 
                                                                                                      🔴  TrackingService stopped
2025-01-14 13:50:32.772 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService f] 
                                                                                                      ⚙️︎  ActivityRecognitionService.stopSelfResult(1): true
2025-01-14 13:50:32.774 29913-29913 TSLocationManager       com.go                   D  [c.t.l.service.AbstractService onDestroy] 
                                                                                                      🔴  ActivityRecognitionService stopped
2025-01-14 13:50:33.479 29913-30717 TSLocationManager       com.go                   I  [c.t.l.http.HttpService$f onResponse] 
                                                                                                      🔵  Response: 200
2025-01-14 13:50:33.482 29913-30717 TSLocationManager       com.go                   D  [c.t.l.d.s.SQLiteLocationDAO destroy] 
                                                                                                      ✅  DESTROY: 379ec1d8-a48a-4c7b-a325-2b037362a2c2
2025-01-14 13:50:33.487 29913-30717 TSLocationManager       com.go                   I  [c.t.l.u.BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 2
2025-01-14 13:52:19.629 29913-29913 TSLocationManager       com.go                   I  [c.t.l.s.TSScheduleManager oneShot] 
                                                                                                      ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
2025-01-14 13:52:20.323 29913-29913 TSLocationManager       com.go                   D  [c.t.l.l.LifecycleManager onPause] ☯️  onPause
2025-01-14 13:52:20.328 29913-29913 TSLocationManager       com.go                   D  [c.t.l.l.LifecycleManager onStop] ☯️  onStop
2025-01-14 13:52:29.662 29913-31079 TSLocationManager       com.go                   I  [c.t.l.scheduler.ScheduleEvent a] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ ⏰ OneShot event fired: TERMINATE_EVENT
                                                                                                    ╠═════════════════════════════════════════════
2025-01-14 13:52:29.663 29913-31079 TSLocationManager       com.go                   D  [c.t.l.event.TerminateEvent$a onChange] 
                                                                                                      ℹ️  TERMINATE_EVENT ignored (MainActivity is still active).
2025-01-14 13:57:05.006 29913-29913 TSLocationManager       com.go                   D  [c.t.l.l.LifecycleManager onStart] ☯️  onStart
2025-01-14 13:57:05.025 29913-29913 TSLocationManager       com.go                   D  [c.t.l.l.LifecycleManager onResume] ☯️  onResume
2025-01-14 13:57:05.037 29913-32368 TSLocationManager       com.go                   I  [c.t.l.http.HttpService flush] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ HTTP Service (count: 0)
                                                                                                    ╠═════════════════════════════════════════════
2025-01-14 13:58:32.867 29913-29913 TSLocationManager       com.go                   I  [c.t.l.s.TSScheduleManager oneShot] 
                                                                                                      ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
2025-01-14 13:58:50.425 29913-32544 TSLocationManager       com.go                   I  [c.t.l.scheduler.ScheduleEvent a] 
                                                                                                    ╔═════════════════════════════════════════════
                                                                                                    ║ ⏰ OneShot event fired: TERMINATE_EVENT
                                                                                                    ╠═════════════════════════════════════════════
2025-01-14 13:58:50.427 29913-32544 TSLocationManager       com.go                   D  [c.t.l.event.TerminateEvent$a onChange] 
                                                                                                      ℹ️  TERMINATE_EVENT ignored (MainActivity is still active).
@christocracy
Copy link
Member

Is this your first time using this sdk? This is exactly what’s supposed to happen. Now go outside for a walk/drive (>= 1km)

also see wiki:

https://github.com/transistorsoft/react-native-background-geolocation/wiki/Philosophy-of-Operation

and enable debug: true so you can hear the debugging soundFX. See api docs Config.debug to learn what they mean.

@121Unicorns
Copy link
Author

Is this your first time using this sdk? This is exactly what’s supposed to happen. Now go outside for a walk/drive (>= 1km)

also see wiki:

https://github.com/transistorsoft/react-native-background-geolocation/wiki/Philosophy-of-Operation

and enable debug: true so you can hear the debugging soundFX. See api docs Config.debug to learn what they mean.

I've been using the library for some time. Even when in motion, it isn't sending any updates. I can send more detailed logs if that's needed.

@christocracy
Copy link
Member

christocracy commented Jan 14, 2025

See https://dontkillmyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants