BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-14-2009, 11:56 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to detect touch/non-touch device

Please Login to Remove!

I need to build one project for both touch and non-touch devices. How can I detect touch/non-touch device at runtime?

Thanks in advance.
Offline  
Old 09-14-2009, 03:08 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Look at the device model number.

DeviceInfo.getDeviceName()

Of course, thre is a method to detect a touch screen in later releases, but it is not in the pre 4.7 API's so you cannot call it.

Last edited by Dougsg38p : 09-14-2009 at 03:56 PM.
Offline  
Old 09-16-2009, 01:09 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for your help.
Offline  
Old 09-16-2009, 07:05 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Aug 2006
Model: 7100x
Carrier: Vodafone
Posts: 33
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Canvas(pure j2me) has 2 methods for this:
hasPointerEvents
hasPointerMotionEvents

links to doc:
RIM Device Java Library: Class Canvas

RIM Device Java Library: Class Canvas

CrucialSoft
Offline  
Old 09-19-2009, 10:40 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Jul 2009
Model: 7100T
PIN: N/A
Carrier: Sprint
Posts: 39
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.