Prevent backlight dimming

Community based support for the Digium Phone Application Programming Interface (API).

Moderators: jwitt, sruffell, malcolmd, Moderator

Prevent backlight dimming

Postby timo » Thu Sep 26, 2013 10:20 pm

Is there a chance to stop backlight dimming when the app is shown?
I display a genericMenu when a call arrives in a pickup group and it would be nice when the phone doesn't remain dark...
I searched through the whole api-reference but didn't got a clue...
timo
Newsterisk
 
Posts: 7
Joined: Wed Sep 25, 2013 6:07 am

Re: Prevent backlight dimming

Postby sruffell » Thu Sep 26, 2013 11:21 pm

Yes, digium.resetIdleTimer() will also prevent the backlight from diming if you call it faster than whatever the user has configured the backlight dimmer timeout.

It does not appear that the app can get the actual value of the timeout, so you might need to set it to something reasonably fast.

For example, the following in your app will keep the app in the foreground and the backlight on as long as the timeout is set for something over 2.5 seconds.

Code: Select all
var timer = setInterval(function() { digium.resetIdleTimer(); }, 2500);
sruffell
Oldsterisk
 
Posts: 200
Joined: Fri Jan 07, 2011 2:02 pm

Re: Prevent backlight dimming

Postby timo » Thu Sep 26, 2013 11:49 pm

Thank you again!
Although it's just a workaround but it works ;)
timo
Newsterisk
 
Posts: 7
Joined: Wed Sep 25, 2013 6:07 am


Return to Digium Phone API

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest