Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

Continue logging while app is in background #1

Open
tjanson opened this issue Mar 11, 2015 · 6 comments
Open

Continue logging while app is in background #1

tjanson opened this issue Mar 11, 2015 · 6 comments

Comments

@tjanson
Copy link
Owner

tjanson commented Mar 11, 2015

Currently location updates & wifi scans are suspended onPause. This is impractical for real-world usage. The user should not be forced to have the app in the foreground; instead, logging should continue (until stopped by the user) and a notification should be displayed.

tjanson added a commit that referenced this issue Mar 12, 2015
When the app goes out of foreground while logging to disk, e.g.,
because the screen turns off or another app is started, acquire partial
wake-lock and continue logging.

If not logging to disk, behavior is unchanged, i.e., updates are
suspended.

This feature is (particularly) experimental and definitely needs
testing and/or a review.

See #1
@tjanson
Copy link
Owner Author

tjanson commented Mar 13, 2015

This seems to be working fine. I’ll keep this open for the following improvements:

  • somehow make sure the app does not get killed by Android while in the background
  • display a permanent notification while logging

@tjanson tjanson closed this as completed Mar 15, 2015
@tjanson tjanson reopened this Mar 15, 2015
@tjanson
Copy link
Owner Author

tjanson commented Mar 15, 2015

see also #9 which is related

@tjanson
Copy link
Owner Author

tjanson commented Mar 16, 2015

@Frief84
Copy link

Frief84 commented Mar 16, 2015

please have a look at Open W-LanMapp Aplication
http://sourceforge.net/p/libwlocate/code/ci/master/tree/master/

@tjanson
Copy link
Owner Author

tjanson commented Mar 16, 2015

I scanned some of the code. They also use a wake-lock, but that’s not surprising.

I’m suspecting that the issue of interruptions in the log is generally not because the app is killed, but because the Wifi scan has problems and doesn’t return within a reasonable time.
On my own devices, I’ve never seen the app be killed. Then again, this might be different on other devices and Android versions.

I think we should focus on implementing a warning if no scan result arrives in a certain amount of time. That way, no matter what caused the interruption, at least the user will be informed. (see #9)

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

No branches or pull requests

2 participants