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

Adobe AIR Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Regular Contributor
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

detect bb10 phone with physical keyboard?

I am trying to 'future proof' my app as much as possible.  It uses a custom developed keyboard that I have pop-up when needed (long story, but it has fewer keys and hence I wanted a simpler UI).  However, I would be ok if the user used a physical keyboard if the phone had one.  I know there will eventually be a BB10 phone with a physical keyboard, as the documentation says that when released it will have a 720x720 screen.  Does anyone know how one can detect whether there is a physical keyboard or not?  I could try to detect if both stage.fullScreenWidth == 720 && stage.fullScreenHeight == 720, but this feels a bit kludgey.  Thx.

Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: detect bb10 phone with physical keyboard?

I would create a function in a class or a static function that you can use to determine this. There will probably be an API for it, but for now, you could simply have a function that is stage.fullScreenWidth == stage.fullScreenHeight.

MyDeviceInfo.hasPhysicalKeyboard() : Boolean

You could easily encapsulate the Device class to leverage existing device info. Most likely, this information will come from that class.
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: detect bb10 phone with physical keyboard?

flash.ui.Keyboard.physicalKeyboardType and flash.ui.Keyboard.hasVirtualKeyboard might help.

 

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