×
Namespaces

Variants
Actions
Revision as of 15:44, 1 September 2009 by gaba88 (Talk | contribs)

Archived:How to check for touch support in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search
{{{width}}}
Article Metadata
Tested with
Devices(s): Nokia N95, Nokia 5800 XpressMusic
CompatibilityArticle
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.

78 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×