How to make an app not enter into energy saving mode

16 views
Skip to first unread message

rdvg...@gmail.com

unread,
May 31, 2019, 12:54:45 PM5/31/19
to CodenameOne Discussions
Hi,
I have a development that requires that the app does not allow the device to go into energy savings.

I was reviewing the Uber app on Android for drivers and found that once you start the app the device does not go into energy savings while the app is in the foreground. When the user forces to enter another app an icon appears that allows to continue with the use of the app as shown in the figure.

Screenshot_2.jpg

How can I make my app work in the same way?

Shai Almog

unread,
Jun 1, 2019, 12:54:21 AM6/1/19
to CodenameOne Discussions
Hi,
I'm not sure about the icon but you can disable the screensaver through Display using: setScreenSaverEnabled.
Reply all
Reply to author
Forward
0 new messages