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
New Developer
enginmanap
Posts: 3
Registered: ‎01-18-2012
My Device: playbook
My Carrier: turkcell
Accepted Solution

ignoring SWIPE_UP event, stopping drawer to show up

I am trying to program a lock screen application for playbook os 2.0. For that, I need a way to stop swipe up to register since it turns my window from fullscreen to thumbnail.

 

I have been reading the api referance pages. The most relevant header in blackberry platform services seems to be "navigator.h" but although it has controls for swipe down event, there is no function for swipe up.

 

I have also studied the "screen.h", "event.h" and "bps.h" but no luck.

 

Input events library and gestures library references are both unhelpful too.

 

I am sure there is a way for this, since it already have a lockscreen, that has the functions I seek. I just can not find how it has been done.

 

Anybody has an idea?

Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: ignoring SWIPE_UP event, stopping drawer to show up

You cannot stop swipe up and swipe left/right (i.e. you cannot prevent your app going to tumbnail at this point)

Please use plain text.
Developer
rcmaniac25
Posts: 1,804
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.2174, Z10 (STL100-3)-10.3.0.700 Dev OS, Z30 (STA100-5)-10.3.0.700 Dev OS, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: ignoring SWIPE_UP event, stopping drawer to show up

As of right now, i don't think it is possible. Maybe eventually but now, every app is subject to the swipe up (and any other gestures for that instance)
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: ignoring SWIPE_UP event, stopping drawer to show up


enginmanap wrote:

I am sure there is a way for this, since it already have a lockscreen, that has the functions I seek. I just can not find how it has been done.


You're reaching the wrong conclusion, unfortunately.  It has a lock screen, but the lock screen is likely implemented by the same thing that is monitoring the bezel gestures (the sys.navigator app) so just because it has the ability doesn't mean there's any API available to apps in general.

 

RIM has to provide an API to support this. 

 

It would be a very nice feature for a number of use cases, but does have some security risks...  Imagine if an app surreptitiously put up a screen that simulated the system lock screen, and a user were to unwittingly enter their password into it.  Boom....   (It could be done now, probably, but a user would at least be able to do a bottom-swipe and realize that it was a fake lock screen... but not if you could lock out bezel gestures.)

 

Kids' games would also benefit from the ability to temporarily lock out bezel gestures, since the young ones are often a bit wild with their swiping.

 

I could see it being available but as a restricted permission, so the user would first have to grant the ability to the app to do this.  Maybe we'll see it in future.  Want to create a feature request ticket for it in Jira?


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!
Please use plain text.
New Developer
enginmanap
Posts: 3
Registered: ‎01-18-2012
My Device: playbook
My Carrier: turkcell

Re: ignoring SWIPE_UP event, stopping drawer to show up


peter9477 wrote:
I could see it being available but as a restricted permission, so the user would first have to grant the ability to the app to do this.  Maybe we'll see it in future.  Want to create a feature request ticket for it in Jira?

I have opened an new feature request as you suggested:

 

https://www.blackberry.com/jira/browse/TABLET-432

 

 thanks.

Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: ignoring SWIPE_UP event, stopping drawer to show up

I could imagine it being used as a kiosk- or party-mode. Hand ound the PB to show some photo's but stop people from nosing in your files. Or perhaps a app-lock-mode that - when you swipe up - it goes to the lock screen and you have to enter your password...

 

Better still would just be a Guest account with adjustable privs.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.