Open mdykierek opened 1 week ago
I've read the thread and please note that Sygic, Google Maps, and OsmAnd use GPS and display if used on the phone so the battery drain from these sources should be similar. In my case, the phone display is off and no routing done (just tracking location on car's display) - this means that getting data to present and displaying (animating) has to be the thing, a big thing. I remember from other issues that Android Auto uses a different algorithm than new renderer for the modern phones. It must be a hassle to maintain two renderers. For this case, the super fast and energy saving algorithm is not a must, but high temperatures kill batteries. I like my phone ;)
So I made similar experiments for Google Maps displaying position on car's display offline on the same route. I couldn't quite get the same starting points so I made 2 measurements:
For what it's worth, I see similar experiences. Not only does the phone heat up, but it slows done the charging considerably. Phone is hot to the touch and takes hours to charge, considerably longer than when routing with gmaps for example.
If the screen does stay on, it will quickly heat even more, high enough to cause the Android "excessive heating" warning.
So I bought the USB power meter and going to take measurements. I took a short drive today and quickly looked at the mAmps with Google Maps, Sygic, and OsmAnd+ and it does not look good. I would say very bad in fact. I'll add mapy.cz to the measurements. I estimate, it will take a week or so to get the measurements for all the apps to get the same conditions.
The following measurements were made for OsmAnd+ 4.7.17 displaying map on Toyota Corolla display (no navigation). The rendering at speeds ~90 km/h drives 1-1.43 A (max. what the port can give I guess). At lower speeds the current is smaller. This seems to be what one could expect. My first guess is that there is a lot of useless and unnecessary items animated but still the difference against others is so big that it won't be enough. It seems that power consumption is 4.88 W, 4.95 W, 3.22 W. Not all power of course is used by OsmAnd. Phone idling takes about 0.1 A. This has be taken into account when comparing the actual power usage against other apps.
Some unnecessary map elements were hidden from the driving profile in that task https://github.com/osmandapp/OsmAnd/issues/18894#issuecomment-2185903095 We suppose, that energy consumption while driving will decrease. It can be tested in nightly version, new beta version is also expected by the end of the week
DISCLAIMER: The data is rather rough and approximate. There is a number of factors that have to be taken into account. We can set some reference levels now.
Note that the currents shown on the images are affected by taking the photo with the phone I measured.
We've added battery consumption information to the development plugin
It is now available in nightly builds (https://osmand.net/docs/versions/nightly_versions#nightly-builds) when development plugin enabled
In my screenshot, OsmAnd consumes about 0.4% battery pro minute while simulating navigation. For testing I use 4-years old phone with old battery (the battery has not been replaced).
Thus, battery consumption can now be tested in various scenarios.
Nice. Does it work for scenario where the phone is connected to USB e.g. for Android Auto or this is for when phone is on battery alone?
When charging, there will be positive values: they will show how much energy is being used from the socket
Time for a batch of numbers for a navigation app that is based on OSM too - mapy.cz. It's similar in the detail it (can) display. That would give 2 W - 2.23 W.
Description
I observed this heating phenomenon for quite a while. I saw some mentions in other bugs and mine as well. I decided to watch it closely. At first, I thought it was related to battery heating due to the fact that with Android Auto connected with USB usually charged the phone, but at certain point it reaches 100% and the phone kept being hot. This means, that the heat is coming from computing rather than charging. I don't know a good way of taking CPU temperature measurements so I decided to watch the battery for which I have a tool already. Here are my findings that I plan to update over time:
One can look at this issue as minor as the phone is constantly being charged, but the increased temperature fries the battery. Depending on where the suboptimal code is, it may also affect the on-the-phone use of OsmAnd (which as a cyclist I care a lot). I guess one can spare some CPU when cluttering items were removed from the car view.
Steps to reproduce
Connect the phone, enable Android Auto, show OsmAnd on car's display and go. Observe the phone.
Actual result
Excessive heating of the phone.
Expected result
Reasonable heat level.
Your Environment (required)
WARNING Crash-Logs MAY contain information you deem sensitive. Review this CAREFULLY before posting your issue!