mendhak / gpslogger

:satellite: Lightweight GPS Logging Application For Android.
https://gpslogger.app
Other
1.96k stars 605 forks source link

ot: restarting from sleep #785

Open voyteke opened 4 years ago

voyteke commented 4 years ago

Hi, thanks for a great GPS logger! not sure if I should post here, apologise if I'm in a wrong forum

I'm trying to run GPS Logger on my car radio/head unit, Android 8. GPSL runs well, no issues, BUT: car radio goes to 'sleep mode' whenever ignition/ACC turned OFF there is a setting to add apps that are to be restarted after sleep - but I'm having no luck with that

so, I start GPSL, it runs, logs, all's good after radio power off, UNLESS I bring GPSL to foreground, it no longer logs currently after a stop, I need to remember to bring it once to foreground, it then continues logging, all's good

what's the best way to 'wake it up' ? run something from Tasker ? what ?

thanks, Voytek

mendhak commented 4 years ago

So just to be clear, this sleep mode isn't the same as doze? As in it suspends everything?

there is a setting to add apps that are to be restarted after sleep - but I'm having no luck with that

What is the exact wording of this settings screen? If I can find info or documentation on it there may be an event or hook or something that I'd need to receive in my app that can just restart the logging.

Also have you seen under General there is an option, 'Start on bootup' - if you enable this, does GPSLogger start logging the way you expect?

voyteke commented 4 years ago

as far as I understand, yes, on power (ignition/ACC) OFF, it suspends? sleeps? everything, but, doesn't shutdown - so when the igition/ACC is ON unit doesn't need to boot, just unsleeps - BUT, I don't have full in depth tech knowledge, I may be using incorrect descriptions, sorry. the radio app is supposed to start up/unsleep on 'wake up, so, the 'car radio' starts playing on ignition/ACC turn on

there is Mod settings/Manage Applications with: Whitelist of apps that do not close when sleep: Restart Apps that worked before sleep: List of apps that restart after sleep List of apps that should not work simultaneously

I have added GPSLogger and TomTom to "List of apps that restart after sleep" - not yet sure if that works...

I don't think I have seen 'Start on bootup' option - I'll recheck

If I leave GPSL on foreground screen when turing IGN OFF, it does restart logging OK

I'll try to attach s/shot below ? Screenshot_20191213-190305 Screenshot_20191213-190312

voyteke commented 4 years ago

FWIW, I've tried fiddling with settings with GPSL as 'restarts after sleep' but, not having much luck, it doesn't seem to work as I expected it. if I leave GPSL as active screen, when car restarted it does restart logging, otherwise, it doesn't.