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 Developer
zeeshanakhtar
Posts: 20
Registered: ‎08-18-2008
My Device: Not Specified

Is it possible to detect phone keypad is locked.?

Hi,

Is there any method using java by which I can detect the keypad is currently locked or not.

 

Actually, I want to run my application when the keypad has been locked.

 

Regards,

Zeeshan Akhtar

Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Is it possible to detect phone keypad is locked.?

There is ApplicationManager.isSystemLocked(), but you would have to poll this method.

 

You can also implement MemoryCleanerListener - There is an event sent to this listener when the device is locked.

 

 

 

 

New Developer
zeeshanakhtar
Posts: 20
Registered: ‎08-18-2008
My Device: Not Specified

Re: Is it possible to detect phone keypad is locked.?

thanks that really helps me but I was unable to maximize(request foreground) my application after the locked event. I am getting RuntimeException. I was trying to make a sort of screen saver that runs when ever the phone has been locked.

 

If you want to view the code please let me know.

Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Is it possible to detect phone keypad is locked.?

What you are trying to do is not supported.

 

Trusted Contributor
Thecr0w
Posts: 178
Registered: ‎02-20-2011
My Device: 8700

Re: Is it possible to detect phone keypad is locked.?

Does it really works in os 5.0?

# I tried to change the world, but I couldn't find the source code #