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

Logging stops #1071

Open
stoofvlees opened this issue Apr 16, 2023 · 9 comments
Open

Logging stops #1071

stoofvlees opened this issue Apr 16, 2023 · 9 comments

Comments

@stoofvlees
Copy link

Hi there,
First of all thank you for this very nice app which I've been using for many years now. I recently switched my old phone for a OnePlus 8T but since then I've experienced problems with GPSLogger stopping logging once the screen locks. Basically the same problem as #1051 and #916.

System

  • OnePlus 8T, KB2003 with OxygenOS 13.0
  • Android security update 5 March 2023
  • Build number KB2003_11_F.63
  • GPSLogger 126 (F-Droid)

Config

  • GPSLogger is locked on the apps switcher as suggested on https://dontkillmyapp.com/oneplus?app=GPSLogger under App locking
  • Android settings - Battery - More settings - App battery management - GPSLogger - Allow background activity is on
  • Android settings - Battery - More settings - App battery management - GPSLogger - Allow auto launch is on
  • Android settings - Battery - More settings - Optimize battery use - GPSLogger is set to "don't optimize"
  • GPSLogger has the following permissions: access precise location in foreground, access approximate location in foreground, access location in background, read files from shared storage, show notifications, run at startup, have full network access, view network connections, ask to ignore battery optimizations, run foreground service
  • GPSLogger settings - Log passive locations: tried both on and off, made no difference
  • GPSLogger settings - Hide notification from lock screen is off

Analysis
Debug file is in the attachment.
It seems that GPSLogger is being killed by Android (line 104), but I've got no clue why.

The strange thing is that another GPS logging app, μlogger (https://github.com/bfabiszewski/ulogger-android) works fine on the very same phone. I prefer the user experience and configurability of GPSLogger, though.

Maybe the following is relevant. I noted that GPSLogger does not seem to request the "notification on lock screen" permission even though the "hide notification from lock screen" setting is off in GPSLogger. GPSLogger simply is not listed under Android settings - Notifications & Status bar - Lock screen. μlogger is listed there but strange enough doesn't show a notification on the lock screen during logging. There is an icon from μlogger on the screensaver, though.

Any ideas?
debug.txt

@Ib2412
Copy link

Ib2412 commented Jul 6, 2023

Hatte das selbe problem auf einen Galaxy s20fe.
GPS Logger hat im Hintergrund aufgezeichnet nur das GPS wurde von Android abgeschaltet.
vom abschalten des GPS bis zum öffnen des Loggers alles auf einen Punkt geloggt.

Mit MacroDroid habe ich ein Macro programert die bei vorhandener Benachrichtigung von GPS Logger alle 20 Minuten ein GPS Wakeup sendet und den Logger neu startet.
seit dem geht es.

Translate by Google

i had the same problem on a galaxy s20fe.
GPS Logger was recording in the background only the GPS was turned off by Android.
from switching off the GPS to opening the logger everything is logged to one point.

With MacroDroid I programmed a macro that sends a GPS wakeup every 20 minutes and restarts the logger if there is a notification from GPS logger.
since then it works.

@mendhak
Copy link
Owner

mendhak commented Jul 7, 2023

In the debug file, I can see a stop logging command just before that, 16:57:14 DEBUG GpsLoggingService.stopLogging:457 - . so it makes sense if the service is being destroyed. Is there any part of the log that shows what's happening during locked screen by leaving it for say 1 hour? For example are you seeing minimum logging every 5 minutes or 15 minutes? If yes (and seeing those exact intervals instead of 1 second) then it's likely you're hitting doze mode, which I can't do anything about.

@BorderCounter8812
Copy link

i basically have the same problem. as soon as you lock the screen, logging no longer works.
however, there are two exceptions.
Exception 1: The device is connected to the power supply
Exception 2: Another app that requires GPS is running on the device, e.g. Komoot with active navigation. In this case, logging with GPSLogger works without any problems even when the screen is switched off.
I suspect that there is an error in the implementation of the GPS / location service.
I have a OnePlus 7T with Android 12...

Do you already have a solution to the problem?

@Ib2412: Can you provide us with the macro? Theoretically, one tracking point every 10 minutes is enough for me. I can then actually always switch the GPS on and off again to save battery?

@Ib2412
Copy link

Ib2412 commented Jan 23, 2024 via email

@BorderCounter8812
Copy link

@lb2412 i cant see the macro?

@Ib2412
Copy link

Ib2412 commented Jan 23, 2024 via email

@Ib2412
Copy link

Ib2412 commented Jan 23, 2024 via email

@Ib2412
Copy link

Ib2412 commented Jan 24, 2024

Screenshot_20240124_070246_MacroDroid

@Ib2412
Copy link

Ib2412 commented Jan 24, 2024

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

4 participants