I have such a problem. I am writing Adobe AIR application for Android device. And I need to make device screen not to be dimmed. I’m making it with SystemIdleMode.KEEP_AWAKE this function for a minute-to five. But after that, I make it SystemIdleMode.NORMAL mode and it immediately dimmed. I want it to be dimmed in some standart time. Like after 30 seconds after that time, when I swiched off KEEP_AWAKE mode. How can I do that? Thanx.
public static function (isEnabled):void
{
if(isEnabled)
{
NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
}
else
{
NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.NORMAL;
}
}
I solved this issue in such a way: I switch to SystemIdleMode.NORMAL mode only after that, when user click on the screen. It gives me aditional 30 seconds to not switch screen to dimmed immediatly.