简体   繁体   中英

JavaFXPorts - Battery consumtion - Screen always on

I've a question about JavaFXPorts ' battery consumption. On both Android and IOS , the screen is always on . And the phones get quite hot...

When creating a trace dump on Android or looking at the extensive log on IOS, you can see the QuantumRenderer to be active the whole time (on IOS you can see the message setSwapInterval([0|1]) (OpenGL?) constantly - this could be a lead.

Otherwise: Is it possible, that there's a "always on" flag set? If so: How to turn it off???

Regards, Daniel


Edit: As the image below shows, I did a trace (in fact, I did several) of the app running.

应用程序 - 跟踪

As you can see, there is this ominous Timer active. While in the App there actually is a Timer, I've completely deactivated it's usage, but this "Timer-0" thread is still active... Beside the Charm-Down BLE, there are not many threads I'd suspect. And Timer indicates, that something is active repeatedly. Is this a normal Android behaviour, maybe?

Additionally I'd like to state again: I have some JavaFX-Services in the app, but since there is only this one "Thread-1952" , I assume those are not the reason...


Edit 2:

And another image: Detailed method profiling. This Timer-0 is triggering pulses to the QuantumToolkit , which I assume keeps the screen on.

定时器0脉动

The pulse is done in the big block, starting and ending with a blue small block:

详细脉冲

And I've seen the name MonocleTimer$1.run ()V pop up... Maybe this is the culprit.


Edit 3:

Charm Down BLE-Plugin removed completely:

在此处输入图片说明

Edit 4:

Some time ago I made an example application for other performance issues. It shows the exact same behaviour:

https://github.com/bgmf/example

After some more tests, cleaned-up build file, I was able to reproduce this reliably only on the Nexus 5. Regardless of whether it is plugin in (debug mode) or not, the display stays on. On a Nexus 6, this behavior was not reproducible anymore.

I will close this issue, because I believe it's - once again - a device-related issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM