Archived:How to check for touch support in PySymbian
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.
The article is believed to be still valid for the original topic scope.
The article is believed to be still valid for the original topic scope.
This PySymbian code snippet shows how to check whether a device has touch support.
Article Metadata
Tested with
Devices(s): Nokia N95, Nokia 5800 XpressMusic
Compatibility
Platform(s): S60 3rd Edition, S60 5th Edition
Platform Security
Capabilities: )
Article
Keywords: appuifw
Created: bogdan.galiceanu
(24 Mar 2009)
Last edited: hamishwillee
(08 May 2013)
Preconditions
This API is available in S60 3rd Edition and S60 5th Edition and was introduced in PySymbian 1.9.3.
Source code
import appuifw
#A try statement is used to prevent the code from crashing on versions prior to 1.9.3
try:
if appuifw.touch_enabled():
appuifw.note(u"Touch is supported")
else:
appuifw.note(u"Touch is not supported")
except:
appuifw.note(u"Feature is not available")
Postconditions
A message indicating the availability of touch is displayed.


(no comments yet)