tjanson / WifiLocationLogger

Android application for logging Wifi signal strength by location
32 stars 10 forks source link

Continue logging while app is in background #1

Open tjanson opened 9 years ago

tjanson commented 9 years ago

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 commented 9 years ago

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

tjanson commented 9 years ago

see also #9 which is related

tjanson commented 9 years ago

One possible problem:

Ach ja, da vermute ich: bekanntes Wlan gefunden! Wenn nämlich das Android ein auf "automatisch verbinden" gestelltes Wlan sieht, dann geht es in die DHCP&Co-Prozedur... und das bringt Wifi-Scanner ins Straucheln. Aber der Wifianalyzer und die Wiggle-App erkennen das und recovern einige Sekunden später wieder.

tjanson commented 9 years ago

Android Reference: Processes & Threads

Frief84 commented 9 years ago

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

tjanson commented 9 years ago

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)