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
Developer
sowjanya1919
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve
My Carrier: company

backlight onOff issue

In my application i am trying to ask the user to enter there passcode when ever the screen backlight is off and we press any key....means if we are running the application and kept in standby mode for some time...then the backlight will be off...once we click on any key i want my appication to open and  keydown method has to cal where i can write my passcode entry code. So please tell me how to get the keylistener when the application is in background.

Please use plain text.
Developer
simon_hain
Posts: 16,113
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: backlight onOff issue

you cannot intercept keys when your application is in the background.
maybe you can find another way to achieve your goal, like monitoring the foreground application.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
sowjanya1919
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve
My Carrier: company

Re: backlight onOff issue

i want to know when we are opening our app and stoped doing any action for 1min then at that time the backlight will to off and when we press on any button the backlight will be on and the screen where i am stoped in my application will be visible. How come this will happen. In androd i ask my friend they are telling that to them the onresume() will be called for that screen.

Please use plain text.
Developer
simon_hain
Posts: 16,113
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: backlight onOff issue

you can check if http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/ui/UiApplication.html#activate... is called, this is the event that is triggered when the application comes to the foreground, but i am not sure if it is fired when the screen was off.

if your app is the foreground app a keylistener or navigationlistener should also work.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
sowjanya1919
Posts: 109
Registered: ‎08-21-2012
My Device: Blackberry curve
My Carrier: company

Re: backlight onOff issue

ok. I will try this acitvate() and let you know whether it is sucessfull or not

Please use plain text.