Archived:How to check for touch support in PySymbian
Article Metadata
Tested with
Devices(s): Nokia N95, Nokia 5800 XpressMusic
Compatibility
Platform(s): S60 3rd Edition, S60 5th Edition
Article
Keywords: appuifw
Created: (24 Mar 2009)
Last edited: gaba88
(01 Sep 2009)
Contents |
Overview
This snippet shows how to check whether a device has touch support in Python.
Preconditions
This API is available in S60 3rd Edition and S60 5th Edition and was introduced in PyS60 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.

