osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.67k stars 1.02k forks source link

Info in notification while navigating is not updating #10878

Open vbedecs opened 3 years ago

vbedecs commented 3 years ago

Description

While navigating, info in notification with navigation directions is not updating correctly. This should be updated regularly every second.

How to reproduce?

  1. Start navigation and wait and moment.
  2. Check info in navigation notification in status bar.
  3. Info is outdated - it's the one when navigation was launched (eta is not valid and other info as well...)

Your Environment

OsmAnd Version: 3.9.6, 2021-02-09 Android/iOS version: Android 10 Device model: OnePlus 6T

Maps used (online or offline):
Offline map - Slovakia

dmpr0 commented 3 years ago

Hi, @vbedecs! I have tested navigation notification and I couldn't reproduce the issue. Does the navigation is working when you testes it? Maybe navigation isn't working due to some energy-saving restrictions on OnePlus devices. If you can please record a video with the issue.

vbedecs commented 3 years ago

Hello @dmpr0 ! Yes, my navigation is launched during the test. I double checked every possible energy/battery saving features - everything is disabled. I have checked your code and I think that notification data are definitely not refreshed periodically, but only at certain events (when new directions arrives, recompute, or when you put app to background and back to foreground - refreshes in activity onresume method).

Attaching screenshots from my simple and quick test (start navigation, put the app into landscape and check how often data in notification gets refreshed, you will see that it is not very often...):

Screenshot_20210215-180056 Screenshot_20210215-180304

I can create the video if it helps, but screenshots are pretty straightforward.

vshcherb commented 3 years ago

I think it's clear on your screenshot that notification wasn't updated for at least 2 min but we're still investigating how to reproduce it.