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 Contributor
Posts: 3
Registered: ‎04-13-2012
My Device: 9700
My Carrier: ATT

Code to temporarily disable touch screen interface

I am looking for a code that will disable the touch screen intraface temporarily, or as long as the app is running (or with a switch). The main purpose is to stop toddler from controling the device while watching a video. Surely a hold switch would have been great, but since it is not an option to modify the hardware, I thought we could manually enable/disable the touch input.

 

Basically the app would disable touch screen or map a certain hardware button to enable/disable touch screen, like volume rocker press-hold, etc.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Code to temporarily disable touch screen interface

There's no API to support this, and although you could certainly have your own app stop responding to touches within the screen area, you cannot currently prevent the user from being able to do the side (left, right) or bottom swipes, thereby switching away from your app.

You could check in the JIRA issue tracker (though it's offline for maintenance this evening) to see if this feature has ever been requested before. If it has, you can "vote" for it, and if it hasn't you should add this as a feature request.

It's certainly a potentially useful feature and I know you're not the first to ask in the forums for something like it.

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!
New Contributor
Posts: 3
Registered: ‎04-13-2012
My Device: 9700
My Carrier: ATT

Re: Code to temporarily disable touch screen interface

[ Edited ]

Thanks, I will certainly check that. I am aware that I am not alone, in fact in other sites there has been few responses to this, and I may be able to draw them to the voting, if there is already a request for this, otherwise starting from scratch will be difficult.

 

Actually modification of any hardware button's functionality would be a better utilization of this app/script, and I understand it would mean modifying the core OS. I also know that this was a requirement for 99xx devices as well, and it was never introduced, or even considered by RIM, and that devices has another way for user to interact (trackpad). So thinking that RIM would even consider this, I think our chances are extremely slim.