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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
Developer
bba
Posts: 266
Registered: ‎04-01-2009
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?

 

 

Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008

Re: Error on ApplicationManager.isSystemLocked()

Try like this..

 

ApplicationManager.getApplicationManager().isSystemLocked();


Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
Developer
Developer
bba
Posts: 266
Registered: ‎04-01-2009

Re: Error on ApplicationManager.isSystemLocked()

Perfect! Thank you!

 

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

Please use plain text.
Developer
baskaraninfo
Posts: 342
Registered: ‎02-04-2009

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.
Please use plain text.
Developer
Developer
bba
Posts: 266
Registered: ‎04-01-2009

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?

Please use plain text.
Developer
baskaraninfo
Posts: 342
Registered: ‎02-04-2009

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.
Please use plain text.