Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 7
Registered: ‎08-01-2012
My Device: Developer
My Carrier: Developer

Turn On Display Programmatically

Hi,

 

I have an issue where if my app displays a new screen while the display is off then the user has to activate the screen themselves so they can see the new screen. Is there a way for my app to programatically turn the display on when a new screen is displayed?

 

Regards,

 

Ben

Developer
Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: Turn On Display Programmatically

You mean backlight time,

 

If Yes try with this on starting of your new screen.

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/How_To_...

 

Thanks.

New Contributor
Posts: 7
Registered: ‎08-01-2012
My Device: Developer
My Carrier: Developer

Re: Turn On Display Programmatically

That would enable me to stop the display turning off, but I can I turn it on once it has gone off?

Developer
Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: Turn On Display Programmatically

I think you can try like this

 

if(!Backlight.isEnabled())
        Backlight.enable( true);

 

Thanks.

New Contributor
Posts: 7
Registered: ‎08-01-2012
My Device: Developer
My Carrier: Developer

Re: Turn On Display Programmatically

I think that works if the display is just off, what about if the handset has been locked? Is there anyway to prorammatically unlock the handset so a screen can be displayed?

Developer
Posts: 543
Registered: ‎12-23-2010
My Device: Z10
My Carrier: Airtel

Re: Turn On Display Programmatically

AFAIK there is no way to unlock,

But you can find it using,

 

ApplicationManager.isSystemLocked

 

Thanks.