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
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500
My Carrier: _

Re: How to lock the device BB 10 programmatically

I am looking to lock the device from BB 10 (Native Coding). Please help me do this.

 

Please use plain text.
BlackBerry Development Advisor
mwhiteman
Posts: 159
Registered: ‎11-21-2008
My Device: BlackBerry 10
My Carrier: Rogers

Re: How to lock the device BB 10 programmatically

Hello,

 

You can check if the device is locked, but you cannot programmatically set the device to lock. The documentation can be found here: https://developer.blackberry.com/cascades/reference/bb__platform__homescreen.html

 

Thanks,

Matt

Matt Whiteman
Product Manager, Android, BlackBerry Java & Simulators
Please use plain text.
Developer
nemory
Posts: 216
Registered: ‎05-21-2012
My Device: BlackBerry RED Z10
My Carrier: WiFi

Re: How to lock the device BB 10 programmatically

I wish there was a solution to this. 

Please use plain text.
Developer
Benecore
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: How to lock the device BB 10 programmatically

:Offtopic:

I wish an API for this and others features. Turn Off device, restart device, on/off connections, changing profiles etc... It would be great.

It would be created many new usefull apps within 'Headless' API :smileywink:



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
Please use plain text.
BlackBerry Development Advisor
shaque
Posts: 231
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to lock the device BB 10 programmatically

Understood the need. I will request these features but I see these leading to potential UX mess. We will have to find a good way to make these available without compromising user experience..
Please use plain text.
Developer
ekke
Posts: 1,476
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: How to lock the device BB 10 programmatically

why not adding this to Smart Tags App ?

then user can create a NFC Tag to immediately lock the device

 

got this request from some customners.

 

you can lock if put into a holster, but if there's no holster the shortest period is 1 minute before device is locked after switching off.

 

another solution could be a setting that on/off switch immediately locks the device.

 

just tried all options using 10.2.1 but didn't find a way to lock using on/off switch

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
smiley
Posts: 1,454
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

Re: How to lock the device BB 10 programmatically


ekke wrote:

why not adding this to Smart Tags App ?

then user can create a NFC Tag to immediately lock the device

 

got this request from some customners.

 

you can lock if put into a holster, but if there's no holster the shortest period is 1 minute before device is locked after switching off.

 

another solution could be a setting that on/off switch immediately locks the device.

 

just tried all options using 10.2.1 but didn't find a way to lock using on/off switch


Turning on and off wifi, airplane mode, cell network isn't possible.  I've been asking for this for months now.

 

SayIt developer apparently is able to turn wifi on and off.  I heard that you need to apply for this permission.

 

So where and how do I apply for this?

Please use plain text.
Developer
slashkyle
Posts: 820
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

Re: How to lock the device BB 10 programmatically

[ Edited ]

ekke wrote:

 

just tried all options using 10.2.1 but didn't find a way to lock using on/off switch


if you hold down the power button for 2-3 seconds a black window pops up with 3 options, 1 of them allows you to lock the device immidiately.

 

That's about as far as our lockability goes :smileywink:

 

 


smiley wrote:

So where and how do I apply for this?


 

To request a new feature file a request in Jira and it will be 'looked into'

 

https://www.blackberry.com/jira/secure/Dashboard.jspa

 

As Paul pointed out to me the other day simply asking for things in the forums will get you nowehere because they don't have anyone tracking the forums to make requests (even though they should)... Everything must go through Jira or they will not consider it.  

 

If you do not spam the forums to get people to vote on your jira ticket, it is likely they will not even consider it, instead they will think its not important.

 

 

Once you have created a ticket and gave it time to be voted on and such, (1-2 months) if nothing has came of it I would suggest to bring it to the attention of Brian Zubert, the VP of developer relations and let him know why you need it.

Please use plain text.
Developer
ekke
Posts: 1,476
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: How to lock the device BB 10 programmatically


slashkyle wrote:

ekke wrote:

 

just tried all options using 10.2.1 but didn't find a way to lock using on/off switch


if you hold down the power button for 2-3 seconds a black window pops up with 3 options, 1 of them allows you to lock the device immidiately.

 

That's about as far as our lockability goes :smileywink:

 

 ...


still would prefer an option to get this without the long-press on power button

will ask Michael Clewley ;-)

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: How to lock the device BB 10 programmatically

Being able to programatically reboot or lock the device could lead to some very bad things <tm>.

 

If I write an app that just locks the screen constantly, people will get angry.

If I write a headless app that constantly reboots the device, people will get angry.

Please use plain text.