Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

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

Archived:How to check for touch support in PySymbian

From 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.

189 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.

×