UrbanBiker icon indicating copy to clipboard operation
UrbanBiker copied to clipboard

Screen goes to Android lock screen periodically, then back to dashboard

Open dd-b opened this issue 4 years ago • 2 comments

While riding I find the screen goes to the Android lock screen after a little while (few minutes), stays there a while, then back to the dashboard. And repeats the cycle. I don't touch the phone at all to make it come back, I just wait.

No external sensors, no premium services, phone is Google Pixel 3XL

dd-b avatar Jun 20 '20 22:06 dd-b

Hi, please open the Settings > Display > General screen and observe the first three options, namely "Keep screen on", "Allow off when inactive" and "Keep above lockscreen". All three are enabled by default, so set them up according to expected behavior. For example, if you don't want screen to go off (or to lockscreen) at any time while app is in the foreground, even if tracking is not active, uncheck the "Allow off when inactive" option.

We do admit that the behavior you described is a bit odd even when all three options are enabled. However, if the above does not help, the explanation of the issue must lie somewhere else, probably inside the system. Those options simply trigger Android window flags (e.g. WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) that can be either set or unset, and as such they include no complicated algorithms or other parts of code where bug might be introduced inside the app. In this case we would suggest installing all the latest system updates.

Hope this helps. Thanks for the feedback!

Sublimis avatar Jun 22 '20 11:06 Sublimis

Thanks. Fiddling with these settings did result in things staying on. I had changed one to a non-default state, I think, from what you say the defaults are. The names don't make things completely clear what they do, always a problem with user interfaces! (I had a 50-year career developing software, though never for Android or mobile devices.)

On 2020-06-22 06:57, Sublimis wrote:

Hi, please open the Settings > Display > General screen and observe the first three options, namely "Keep screen on", "Allow off when inactive" and "Keep above lockscreen". All three are enabled by default, so set them up according to expected behavior. For example, if you don't want screen to go off (or to lockscreen) at any time while app is in the foreground, even if tracking is not active, uncheck the "Allow off when inactive" option.

We do admit that the behavior you described is a bit odd even when all three options are enabled. However, if the above does not help, the explanation of the issue must lie somewhere else, probably inside the system. Those options simply trigger Android window flags (e.g. WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) that can be either set or unset, and as such they include no complicated algorithms or other parts of code where bug might be introduced inside the app. In this case we would suggest installing all the latest system updates.

Hope this helps. Thanks for the feedback!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sublimis/UrbanBiker/issues/79#issuecomment-647470537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA62Z3SDPF5KZXFTUC5LFHLRX5BJXANCNFSM4ODSPKHQ.

-- David Dyer-Bennet [email protected] http://dd-b.net/

dd-b avatar Jun 23 '20 02:06 dd-b