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

Java Development

Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified
Accepted Solution

Test for SurePress?

Does anyone know a way to programatically test if a device has a SurePress touch screen other than checking the model number?


The only thing I've found is TouchScreen.isSupported() but that doesn't really help.



Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-, Z10 (STL100-3)-, Z30 (STA100-5)-, Passport (SQW100-1)-, PlayBook (16GB)-
My Carrier: Verizon

Re: Test for SurePress?

You would need to make two versions of the app. One for pre-6.0 and one for 6.0 and higher. The reason for this is 4.7 to 5.0, only the Storms existed with a touch screen. The Torch uses 6.0 (and higher presumably).


In 6.0 and higher you have the DeviceCapability class. In that class you have the isTouchClickSupported() function which is a wrapper for isSupported(TYPE_TOUCH_CLICK).


If you can only have one build then you need to check model numbers.

---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.