Rethink screen wakelock - let the screen sleep in "normal" mode, but keep it on in "navigation" mode #1578

Open
opened 2021-11-20 00:50:26 +00:00 by denilsonsa · 3 comments
denilsonsa commented 2021-11-20 00:50:26 +00:00 (Migrated from github.com)

#437 and #196 and 470bc6f231 added a new setting "Allow screen to sleep". This setting is great for saving battery. However, sometimes that's desirable, sometimes not.

My problem: I tried using Organic Maps (Android) for a quick navigation (driving from point A to point B). However, having the screen to turn of while driving is less than ideal. In fact, it's dangerous. But at the same time I like letting it turn off automatically when idle, because I'm used to the behavior of the phone going to sleep on most apps.


What happens: There is one boolean toggle to let the screen turn off automatically, or to keep it always on. This setting is global, applies to the entire app, disregarding the context.

What should happen: I'm not sure exactly. Let me enumerate certain use-cases (AKA brainstorm):

  • Thinking about the current map mode:
    • While idle in "normal" mode, the screen should turn OFF to save battery.
    • During "navigation" mode…
      • …while driving, most likely the screen should stay ON.
      • …while cycling or walking, the screen could turn OFF automatically. Or maybe not. Let it stay ON, and let the user press the power button to manually turn it off.
  • Thinking about charging state:
    • If the phone is being charged while the app is in use, most likely the user wants the screen to stay on.
    • If the phone is not charging, most likely the screen should go off to save the phone battery.
  • Thinking about what the user is doing:
    • If the user is driving…
      • …most likely the user has the phone connected to a charger in the vehicle, so battery life is not an issue.
      • …most likely the screen timeout will happen after the vehicle is already on the move. (Because the user will start the navigation and then start driving.)
      • …then the user must keep the hands on the wheel and the eyes on the road. Any extra effort to turn on the screen and potentially unlock the phone can be dangerous.
    • If the user is cycling or walking…
      • …most likely the user is on battery, with or without an external power bank.
      • …then the user is moving slower (up to 20km/h), which is less dangerous than driving, and gives more time to react. It also means the user position updates slower, which means the user doesn't need to look at the screen as often.
      • …then most likely the user can reach the phone to turn it on or off. Although doing so while cycling can be cumbersome.
  • Thinking about other app(s):
    • Google maps in normal mode…
      • …will turn the screen off when idle, just as any other app. (In other words, it won't acquire any screen wakelock.)
    • Google maps in navigation mode…
      • …will keep the screen on.
      • …will show up even when the phone is locked. (How to reproduce: enter navigation, then press the power button to turn off the screen and lock the phone, then press the power button again to wake up the phone → the Google Maps Navigation will show up, although the phone is still locked.)

In conclusion… What should Organic Maps do? I think it should treat the two modes in different ways. I like the way Google Maps behaves, mostly because that's what I'm most used to, but also because it seems to behave in a sane way on the different use-cases. But I also like the ability to tweak the settings to the user needs, and I don't want to disrupt any current use-cases. I'm also not sure how to empower the user to tweak the behavior without becoming a UX nightmare.

#437 and #196 and 470bc6f231bcb93a8024e8407d5b7903affdd9d2 added a new setting "Allow screen to sleep". This setting is great for saving battery. However, sometimes that's desirable, sometimes not. My problem: I tried using Organic Maps (Android) for a quick navigation (driving from point A to point B). However, having the screen to turn of while driving is less than ideal. In fact, it's dangerous. But at the same time I like letting it turn off automatically when idle, because I'm used to the behavior of the phone going to sleep on most apps. --- **What happens:** There is one boolean toggle to let the screen turn off automatically, or to keep it always on. This setting is global, applies to the entire app, disregarding the context. **What should happen:** I'm not sure exactly. Let me enumerate certain use-cases (AKA brainstorm): * Thinking about the current map mode: * While idle in "normal" mode, the screen should turn **OFF** to save battery. * During "navigation" mode… * …while _driving_, most likely the screen should stay **ON**. * …while _cycling_ or _walking_, the screen could turn **OFF** automatically. Or maybe not. Let it stay **ON**, and let the user press the power button to manually turn it off. * Thinking about charging state: * If the phone is being charged while the app is in use, most likely the user wants the screen to stay on. * If the phone is not charging, most likely the screen should go off to save the phone battery. * Thinking about what the user is doing: * If the user is driving… * …most likely the user has the phone connected to a charger in the vehicle, so battery life is not an issue. * …most likely the screen timeout will happen after the vehicle is already on the move. (Because the user will start the navigation and then start driving.) * …then the user must keep the hands on the wheel and the eyes on the road. Any extra effort to turn on the screen and potentially unlock the phone can be dangerous. * If the user is cycling or walking… * …most likely the user is on battery, with or without an external power bank. * …then the user is moving slower (up to 20km/h), which is less dangerous than driving, and gives more time to react. It also means the user position updates slower, which means the user doesn't need to look at the screen as often. * …then most likely the user can reach the phone to turn it on or off. Although doing so while cycling can be cumbersome. * Thinking about other app(s): * Google maps in normal mode… * …will turn the screen off when idle, just as any other app. (In other words, it won't acquire any screen wakelock.) * Google maps in navigation mode… * …will keep the screen on. * …will show up even when the phone is locked. (How to reproduce: enter navigation, then press the power button to turn off the screen and lock the phone, then press the power button again to wake up the phone → the Google Maps Navigation will show up, although the phone is still locked.) --- In conclusion… What should Organic Maps do? I think it should treat the two modes in different ways. I like the way Google Maps behaves, mostly because that's what I'm most used to, but also because it seems to behave in a sane way on the different use-cases. But I also like the ability to tweak the settings to the user needs, and I don't want to disrupt any current use-cases. I'm also not sure how to empower the user to tweak the behavior without becoming a UX nightmare.
biodranik commented 2021-11-20 17:03:38 +00:00 (Migrated from github.com)

What is the behavior of other apps?

What is the behavior of other apps?
denilsonsa commented 2021-11-21 10:51:37 +00:00 (Migrated from github.com)

TL;DR: Look at the summary at the bottom.

Google Maps

  • At the "normal" view of the map…
    • …the screen turns off automatically according to the system settings.
  • At the "directions" mode…
    • …the screen stays always on.
    • …the Google Maps in driving mode will show up instead (or before) the lock screen. (How to reproduce: press the power button to lock the phone, and then press it again to turn the screen on.)
    • …switching to another app will keep the driving map visible in a "picture-in-picture" style.
  • At the "directions" "picture-in-picture" mode…
    • …the screen stays always on.
    • …locking the phone will NOT show up Google Maps before the lock screen. Instead, it just shows the standard notification, which is very minimal and only shows the next step of the directions.

Waze

Waze is focused on driving, it doesn't support any other transportation method (no walking, no cycling, no public transportation). It supports either driving a private car, a taxi, or riding a motorcycle.

  • At the "normal" mode…
    • …the screen stays always on. Given it's an app designed to be a company to the driver, regardless of the need for directions, it kinda makes sense. The driver leaves the phone mounted to the car, plugged to a charger, and with Waze open.
    • …, when in the background or at the lock screen: it shows a useless notification that Waze is still running. That's all. No directions in the notification.
  • At the "directions" mode…
    • …it behaves just like the "normal" mode.

Waze also has an interesting setting:

Screenshot of the Waze "Battery saver" settings screen

Waze will dim your screen when your battery is low and there are no upcoming turns. For full brightness, tap the screen.

This sounds like a great use-case for SCREEN_DIM_WAKE_LOCK. If there are no upcoming turns, let the screen dim, but allow the user to get normal brightness by tapping, and get normal brightness automatically near any turn. I'd prefer to have it enabled regardless of the battery level, because that will prevent the battery from getting too low.

Citymapper

Citymapper is focused on basically anything but driving. It supports walking and public transportation, as well as cycling. It also shows information from other services to rent/share different kinds of vehicles (bikes, mopeds, cars) and even from Uber.

  • At the "normal" mode…
    • …the screen turns off automatically according to the system settings.
  • At the "directions" mode…
    • …the screen stays on.
    • …it shows a helpful notification showing the next step, as well as two arrows to view the following steps.
    • …at the lock screen, there are no fancy features: just the notification.
    • it vibrates when it is time to take off the bus/train/metro/tram at the next stop. I don't remember if it vibrates when it is time to make a turn (useful if the phone is in your pocket while walking or cycling).

A Better Routeplanner (ABRP)

ABRP is focused on planning routes for EVs (electric vehicles), taking into account the stops for charging stations. The app feels like a webview, the interface doesn't always behave as users expect.

  • At the "normal" mode…
    • …the screen turns off automatically according to the system settings.
  • At the "directions" mode…
    • …the screen stays on.
    • …there is no notification.
    • …there is an option to open the route in Google Maps, which has more features and probably a better interface.

These are all the apps I have used in the past couple of years. For sure there are plenty more apps available, but I can't say about them. In summary:

App normal directions notification extras
Google Maps auto-off stays on next turn PiP + shows before the lock screen
Waze stays on stays on useless optional screen dimming on low battery
Citymapper auto-off stays on view multiple next steps vibration
ABRP auto-off stays on none calculates EV battery level and routes through charging points + open route in Google Maps
Organic Maps setting→ ←setting none none

Besides the screen behavior, I think this research can lead to further ideas of features for Organic Maps. (PiP, lock screen, notification, vibration)

**TL;DR:** Look at the summary at the bottom. ## [Google Maps](https://play.google.com/store/apps/details?id=com.google.android.apps.maps) * At the "normal" view of the map… * …the screen turns off automatically according to the system settings. * At the "directions" mode… * …the screen stays always on. * …the Google Maps in driving mode will show up instead (or before) the lock screen. (How to reproduce: press the power button to lock the phone, and then press it again to turn the screen on.) * …switching to another app will keep the driving map visible in a "[picture-in-picture](https://developer.android.com/guide/topics/ui/picture-in-picture)" style. * At the "directions" "picture-in-picture" mode… * …the screen stays always on. * …locking the phone will NOT show up Google Maps before the lock screen. Instead, it just shows the standard notification, which is very minimal and only shows the next step of the directions. ## [Waze](https://play.google.com/store/apps/details?id=com.waze) Waze is focused on driving, it doesn't support any other transportation method (no walking, no cycling, no public transportation). It supports either driving a private car, a taxi, or riding a motorcycle. * At the "normal" mode… * …the screen stays always on. Given it's an app designed to be a company to the driver, regardless of the need for directions, it kinda makes sense. The driver leaves the phone mounted to the car, plugged to a charger, and with Waze open. * …, when in the background or at the lock screen: it shows a useless notification that Waze is still running. That's all. No directions in the notification. * At the "directions" mode… * …it behaves just like the "normal" mode. Waze also has an interesting setting: ![Screenshot of the Waze "Battery saver" settings screen](https://user-images.githubusercontent.com/121676/142757876-766137aa-84b8-428a-94e3-50e91c5f20cf.jpg) > Waze will dim your screen when your battery is low and there are no upcoming turns. For full brightness, tap the screen. This sounds like a great use-case for [`SCREEN_DIM_WAKE_LOCK`](https://stackoverflow.com/q/14226426). If there are no upcoming turns, let the screen dim, but allow the user to get normal brightness by tapping, and get normal brightness automatically near any turn. I'd prefer to have it enabled regardless of the battery level, because that will prevent the battery from getting too low. ## [Citymapper](https://play.google.com/store/apps/details?id=com.citymapper.app.release) Citymapper is focused on basically anything but driving. It supports walking and public transportation, as well as cycling. It also shows information from other services to rent/share different kinds of vehicles (bikes, mopeds, cars) and even from Uber. * At the "normal" mode… * …the screen turns off automatically according to the system settings. * At the "directions" mode… * …the screen stays on. * …it shows a helpful notification showing the next step, as well as two arrows to view the following steps. * …at the lock screen, there are no fancy features: just the notification. * …[it vibrates when it is time to take off the bus/train/metro/tram at the next stop](https://citymapper.com/news/823/get-off-alerts). I don't remember if it vibrates when it is time to make a turn (useful if the phone is in your pocket while walking or cycling). ## [A Better Routeplanner (ABRP)](https://play.google.com/store/apps/details?id=com.iternio.abrpapp) ABRP is focused on planning routes for EVs (electric vehicles), taking into account the stops for charging stations. The app feels like a webview, the interface doesn't always behave as users expect. * At the "normal" mode… * …the screen turns off automatically according to the system settings. * At the "directions" mode… * …the screen stays on. * …there is no notification. * …there is an option to open the route in Google Maps, which has more features and probably a better interface. --- These are all the apps I have used in the past couple of years. For sure there are plenty more apps available, but I can't say about them. In summary: | App | normal | directions | notification | extras | |:--- |:------ |:---------- |:------------ |:------ | | Google Maps | auto-off | stays on | next turn | PiP + shows before the lock screen | | Waze | stays on | stays on | useless | optional screen dimming on low battery | | Citymapper | auto-off | stays on | view multiple next steps | vibration | | ABRP | auto-off | stays on | none | calculates EV battery level and routes through charging points + open route in Google Maps | | Organic Maps | setting→ | ←setting | none | none | Besides the screen behavior, I think this research can lead to further ideas of features for Organic Maps. (PiP, lock screen, notification, vibration)
Der-Flip commented 2022-04-13 14:24:16 +00:00 (Migrated from github.com)

(feature idea) just because it was mentioned here:
Notifications would be quite a nice feature. When cycling I don't always want to have my phone in my pockets, but rather in my bicycle bag. Having notifications (maybe as an enableable toggle in the settings?) I could have these forwarded to my mi watch lite2 (or any other smart watch), thus not have the feeling of crushing my phone with my thigh / my phone crushing my thigh and stomach while I have it force-fit into my pocket...

(feature idea) just because it was mentioned here: Notifications would be quite a nice feature. When cycling I don't always want to have my phone in my pockets, but rather in my bicycle bag. Having notifications (maybe as an enableable toggle in the settings?) I could have these forwarded to my mi watch lite2 (or any other smart watch), thus not have the feeling of crushing my phone with my thigh / my phone crushing my thigh and stomach while I have it force-fit into my pocket...
This repo is archived. You cannot comment on issues.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#1578
No description provided.