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

Archived:How to check for touch support in PySymbian

Jump to: navigation, search
{{{width}}}
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.

214 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved