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

Native Development

Reply
Contributor
Posts: 22
Registered: ‎03-05-2012
My Device: Torch 9810 Playbook 16GB x3
My Carrier: AT&T

Lock screen button.

Trying to add a button to my app that when pressed will lock the device, but seem to be running in to some trouble. Not sure exactly how to add it to the button.... Any advice? Thank you in advance!
#Curve8900 #Torch9800 #Torch9810 #Playbook #DevAlphaB
#TeamBlackBerry ☑ #BlackBerryFanNight2012 ☑ #BBJamAmericas ☑ #BlackBerryFOTM ☐
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Lock screen button.

What sort of trouble is "some trouble"? (Is there even an API to do this?)

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 22
Registered: ‎03-05-2012
My Device: Torch 9810 Playbook 16GB x3
My Carrier: AT&T

Re: Lock screen button.

Sorry school just started back up and trying to finish I loaded up the classes this semester. I have been incredibly busy and have not been here for a while... What I have. http://imgbin.org/index.php?page=image&id=11020 This is the API https://developer.blackberry.com/cascades/reference/bb__platform__homescreen.html I'm guessing its a syntax issue.... But in all honesty I am not sure, or sure if what I am trying to do is currently possible.
#Curve8900 #Torch9800 #Torch9810 #Playbook #DevAlphaB
#TeamBlackBerry ☑ #BlackBerryFanNight2012 ☑ #BBJamAmericas ☑ #BlackBerryFOTM ☐
Highlighted
Developer
Posts: 49
Registered: ‎11-11-2012
My Device: z10 LE
My Carrier: Digi

Re: Lock screen button.

I'm trying to do the same but the docs seemed to point that these are only 'read-only' states and nothing about setting unless I miss something.



James Tan
Eating my dog food - TripLogger, my 1st bb10 app.
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Lock screen button.

As far as I know there is currently no API that allows a third-party app to force the lock state.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!