Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
Walibi33
Posts: 70
Registered: 11-30-2009
Accepted Solution

How do I know whether a blackerry version features the menu key ?

Hi,

 

I'm working on a Blackberry application, we use the menu key but I've noticed some blackberry versions (like 8700s...) don't feature this key. Is there any way to know a particular version of Blackberry features this key ?

 

Thanks in adance.

Please use plain text.
Developer
rcmaniac25
Posts: 1,713
Registered: 04-28-2009
My Carrier: Verizon

Re: How do I know whether a blackerry version features the menu key ?

Try the net.rim.device.api.ui.Keypad class. I just did a quick look at it but didn't try anything out.

------------------------------------------------------------
Three simple rules:
1. Please use the search bar before making new posts.
2. Kudo 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.

Projects:
Bing 4 BlackBerry: http://bbing.codeplex.com/
PDF Renderer 4 BlackBerry: http://pdfrend4bb.codeplex.com/
Please use plain text.
Developer
Posts: 1,474
Registered: 04-14-2009

Re: How do I know whether a blackerry version features the menu key ?

Check whether Keypad.isValidKeyCode(Keypad.KEY_MENU) works for you -- I've never tried it myself.

Please use plain text.
Developer
Posts: 1,474
Registered: 04-14-2009

Re: How do I know whether a blackerry version features the menu key ?

Sorry, the Keypad.isKeyCodeValid(Keypad.KEY_MENU) returns true even on an 8700 (running v4.5.0 handheld software)...

Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: How do I know whether a blackerry version features the menu key ?

We just wrote a utility method that looks at the model number and returns true or false.

 

 

 

Please use plain text.
Developer
Walibi33
Posts: 70
Registered: 11-30-2009

Re: How do I know whether a blackerry version features the menu key ?

I first thought at this solution but I'm not really fond of it because each time a new Blackberry model comes out you have to update the method returning true or false... And I find it very surprising that there's no way to know whether your device features this hardware ability or not.

 

Anyway, thanks for your answers all.

Please use plain text.
Developer
Posts: 1,474
Registered: 04-14-2009

Re: How do I know whether a blackerry version features the menu key ?

I guess you only need to list a couple of models that don't have the menu key (87xx, 7xxx, 6xxx). All new models have the menu key, although that might change in the future...

Please use plain text.
Developer
Walibi33
Posts: 70
Registered: 11-30-2009

Re: How do I know whether a blackerry version features the menu key ?

Yeah I know I just hoped there might be a proper way to do it though... But I think I'm going to have to consider it evenutally.

Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: How do I know whether a blackerry version features the menu key ?

It's not really that bad - you only need to look at the first two digits, like "87" or "95" to determine the capabilities.

 

We default to "yes" on the theory that new devices will have the key. Of course, we always test on the new devices anyway (when we can get them before the customers do)   :smileyhappy:

 

 

 

Please use plain text.
Developer
Walibi33
Posts: 70
Registered: 11-30-2009

Re: How do I know whether a blackerry version features the menu key ?

I've checked on the Internet : Blackberry 9500 Storm does have a key menu... :smileywink:

Please use plain text.