You Are Here:

Community: Developer Discussion Boards

#1 Old How to identify Touch UI device? - 2009-03-08, 15:48

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Hi,

I want to know, whether my script is running in Touch UI device or not. Any ideas how to do this?

e32.pys60_version() won't work, because I can run both 1.4.x and 1.9.x in 5th ed device.

e32.s60_version_info() won't work, because it only tells which SDK was used to compile "the application" == python runtime or shell. I can run apps made with 3.2 SDK in 5th ed device.

I could check screen resolution, but that's not future-proof at all. I could detect, whether current device screen resolution is similar to 5800 and make a guess that this device could be a Touch UI device... but I could never be 100% sure.

Any more ideas? For PyS60 1.4.x branch for the moment, if possible. For non-touch devices I can use full-screen, but for touch devices I need to leave Options menu visible

Wondering,

--jouni
Reply With Quote

#2 Old Re: How to identify Touch UI device? - 2009-03-08, 18:34

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
I would also say to detect screen resolution, but as you mentioned, you would never be sure. As far as I know, there is no way to detect exactly in current release. Although, should be easy to implement a function for that, so I hope it will be in 1.9.3



BR,

Rafael.
Reply With Quote

#3 Old Re: How to identify Touch UI device? - 2009-03-08, 18:47

Join Date: Nov 2004
Posts: 3,442
Location: Wiltshire, UK
Paul.Todd's Avatar
Paul.Todd
Offline
Forum Nokia Champion
From a C++ point of of view it is done via the AknLayoutUtils::PenEnabled()API.

Note that this API was not exported in FP0 (MR) devices, but there is a workaround here
http://discussion.forum.nokia.com/fo...d.php?t=149512
Reply With Quote

#4 Old Re: How to identify Touch UI device? - 2009-03-08, 22:04

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by Paul.Todd View Post
From a C++ point of of view it is done via the AknLayoutUtils::PenEnabled()API.

Note that this API was not exported in FP0 (MR) devices, but there is a workaround here
http://discussion.forum.nokia.com/fo...d.php?t=149512
Thanx! Created CR for PyS60 1.9.x branch, but not sure if those fellows even look at the CRs. Must be busy with lots of other things. Anyway, now there is a reminder. Don't really want to use/write any extensions myself, they are too much trouble.

https://garage.maemo.org/tracker/ind...=854&atid=3204

While browsing manual, found another solution: sysinfo.os_version() should return "the operating system version number of the device as a three element tuple (major version, minor version, build number).". It's still not quite good enough, there could be touch ui devices based on 3.x branch and non-touch devices based on 5.x branch, but for now it's good enough.

...I mean, if major is 5 or more, then I use "large", otherwise "full"...

Thanx,

--jouni
Reply With Quote

#5 Old Re: How to identify Touch UI device? - 2009-03-09, 04:08

Join Date: Oct 2007
Posts: 114
ashwinurao
Offline
Regular Contributor
Quote:
Originally Posted by JOM View Post
Thanx! Created CR for PyS60 1.9.x branch, but not sure if those fellows even look at the CRs. Must be busy with lots of other things. Anyway, now there is a reminder. Don't really want to use/write any extensions myself, they are too much trouble.

https://garage.maemo.org/tracker/ind...=854&atid=3204

While browsing manual, found another solution: sysinfo.os_version() should return "the operating system version number of the device as a three element tuple (major version, minor version, build number).". It's still not quite good enough, there could be touch ui devices based on 3.x branch and non-touch devices based on 5.x branch, but for now it's good enough.

...I mean, if major is 5 or more, then I use "large", otherwise "full"...

Thanx,

--jouni
There will most certainly be an API exposed to check if the device is touch enabled or not. This will be available in one of the dot releases when touch support is added.


import antigravity
Reply With Quote

#6 Old Re: How to identify Touch UI device? - 2009-03-09, 09:53

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by ashwinurao View Post
There will most certainly be an API exposed to check if the device is touch enabled or not. This will be available in one of the dot releases when touch support is added.
Thanx !!!

Happy to hear that R&D team is following the DiBo

Cheers,

--jouni
Reply With Quote

#7 Old Re: How to identify Touch UI device? - 2009-03-24, 20:32

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
For future reference, appuifw.touch_enabled() has been introduced with PyS60 1.9.3. How to check for touch support in Python.
Reply With Quote

#8 Old Re: How to identify Touch UI device? - 2009-03-25, 08:44

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by bogdan.galiceanu View Post
For future reference, appuifw.touch_enabled() has been introduced with PyS60 1.9.3. How to check for touch support in Python.
That was fast, thanx

Cheers,

--jouni
Reply With Quote

#9 Old Re: How to identify Touch UI device? - 2009-03-26, 12:20

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by ashwinurao View Post
There will most certainly be an API exposed to check if the device is touch enabled or not. This will be available in one of the dot releases when touch support is added.
Hmph,

[#3578] Identify whether device has Touch UI or not
https://garage.maemo.org/tracker/ind...=854&atid=3204

Quote:
State: Open
Assigned To: Nobody (None)
You know that if you don't bother handling feature requests, pretty soon nobody will bother making new ones. Yep, bureaucracy is a bother.

Bother,

--jouni guessing you're using some other non-public system to handle feature requests and defect reports
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify model of mobile via Bluetooth Service Records?? pankaj_shukla General Discussion 2 2008-10-12 20:39
Fire key on touch screen device? girdhar Mobile Java General 1 2008-03-25 10:44
Funambol DM server, E62 and 9500 device manager app rickmorris OMA DM/DS/CP 1 2008-02-26 06:36
Installing Ethernet Plugin on a second device chenfi Symbian Tools & SDKs 0 2005-12-19 12:40
Bluetooth Security: What exactly is an untrusted device? rahulmcs Bluetooth Technology 1 2005-12-02 07:26

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia