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
Developer
Posts: 266
Registered: ‎04-01-2009
My Device: Not Specified
Accepted Solution

Error on ApplicationManager.isSystemLocked()

Hello,

I get this error when compiling:

 

C:\...MyFile.java:662: non-static method isSystemLocked() cannot be referenced from a static context if(!Backlight.isEnabled() && ApplicationManager.isSystemLocked()){ ^

 

where did I go wrong?

 

 

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Error on ApplicationManager.isSystemLocked()

Try like this..

 

ApplicationManager.getApplicationManager().isSystemLocked();


Use Search. "Accept Solution" If the problem is resolved.
Developer
Developer
Posts: 266
Registered: ‎04-01-2009
My Device: Not Specified

Re: Error on ApplicationManager.isSystemLocked()

Perfect! Thank you!

 

But what does the 'locked' refer to? The standby mode or the keylock?

Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: Error on ApplicationManager.isSystemLocked()

[ Edited ]

It determines if the system is currently locked or not. According to you, its keylock.

 

For more information refer, http://www.blackberry.com/developers/docs/4.7.0api/net/rim/device/api/system/ApplicationManager.html

 

You can refer the API's before asking such like questions.

Message Edited by baskaraninfo on 04-24-2009 05:05 AM

Use Search. "Accept Solution" if the problem gets resolved.
Developer
Developer
Posts: 266
Registered: ‎04-01-2009
My Device: Not Specified

Re: Error on ApplicationManager.isSystemLocked()

You're totally right, but it no-where states that it's the keylock and not the system lock (standby).

 

So is there a way to get the same API but for standby-lock?

Developer
Posts: 342
Registered: ‎02-04-2009
My Device: BB 8320

Re: Error on ApplicationManager.isSystemLocked()

[ Edited ]

Relevant posts for your reference:

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=17692&query.id=50...

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=8034&query.id=509... 

Message Edited by baskaraninfo on 04-24-2009 05:28 AM

Use Search. "Accept Solution" if the problem gets resolved.