×
Namespaces

Variants
Actions
Revision as of 08:59, 18 September 2012 by hamishwillee (Talk | contribs)

Archived:How to check for touch support in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

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
CompatibilityPlatform Security
Capabilities: )
Article
Keywords: appuifw
Created: bogdan.galiceanu (24 Mar 2009)
Last edited: hamishwillee (18 Sep 2012)

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.

69 page views in the last 30 days.
×