You Are Here:

Community: Developer Discussion Boards

#1 Old Thumbs up [announce] feature module for 3rd - 2007-02-02, 15:10

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
hello ,

I know that many are waiting for my wonderful modules for upgrading a little your experiments with this fantastic language

So this module allows you to test if your phone supports some features like bluetooth or infrared (but also many others !)

simple example
Code:
import feature
from efeature import *

if feature.supported(KFeatureIdBt):
  print u'Bluetooth supported in your device'
else:
 print u'Bluetooth is not supported in your device'

Here's a complete example for easy testing :
Code:
# test_feature_11
import sys
import e32
import appuifw
from feature import *
from efeature import *

def addline(line):
  t.add(u'%s\n'%line)
  
def addversion(label,ver):
  t.add(u'%s : %d.%d.%d\n'%(label,ver[0],ver[1],ver[2]))
  

def display_supported():
  t.clear()
  addline('Your device supports the following features :')
  if supported(KFeatureIdMmc):
     addline(u'memory Card.')
  if supported(KFeatureIdCamera):
     addline(u'has Camera Application.')
  if supported(KFeatureIdCoverDisplay):
     addline(u'has also separate cover display.')
  if supported(KFeatureIdVideoRecorder):
     addline(u'has Video Recorder application.')
  if supported(KFeatureIdQwertyInput):
     addline(u'has qwerty keyboard.')
  if supported(KFeatureIdFlightMode):
     addline(u'flight mode.')
  if supported(KFeatureIdOfflineMode):
     addline(u'off-line mode.')
  if supported(KFeatureIdOpenGLES3DApi):
     addline(u'3D graphics rendering.')
  if supported(KFeatureIdIrda):
     addline(u'Infrared.')
  if supported(KFeatureIdBt):
     addline(u'Bluetooth.')
  if supported(KFeatureIdUsb):
     addline(u'USB.')
  if supported(KFeatureIdBtFaxProfile):
     addline(u'Bluetooth fax profile.')
  if supported(KFeatureIdBtImagingProfile):
     addline(u'bluetooth imaging profile.')
  if supported(KFeatureIdIm):
     addline(u'Instant Messaging.')
  if supported(KFeatureIdPresence):
     addline(u'Presence.')
  if supported(KFeatureIdSyncMlDm):
     addline(u'SyncML device management standard.')
  if supported(KFeatureIdSyncMlDs):
     addline(u'SyncML data synchronization standard. ')
  if supported(KFeatureIdSvgt):
     addline(u'2D vector graphics SVGT')
  if supported(KFeatureIdAudioEffectsApi):
     addline(u'audio effects.')
  if supported(KFeatureIdAudioResourceIndications):
     addline(u'Audio Resource Indications')
  if supported(KFeatureIdEqualizer):
     addline(u'equalizer.')
  if supported(KFeatureIdProtocolGsm):
     addline(u'GSM cellular stack.')
  if supported(KFeatureIdProtocolWcdma):
     addline(u'WCDMA cellular stack')
  if supported(KFeatureIdProtocolCdma):
     addline(u'CDMA cellular stack.')
  if supported(KFeatureIdCsVideoTelephony):
     addline(u'circuit switched video telephony.')
  if supported(KFeatureIdQos):
     addline(u'Quality of Service.')
  if supported(KFeatureIdIpsec):
     addline(u'IP Security for VPNs')
  if supported(KFeatureIdMIPv6):
     addline(u'Mobile IPv6.')
  if supported(KFeatureIdProtocolWlan):
     addline(u'WLAN protocol.')
  if supported(KFeatureIdSipStack):
     addline(u'SIP protocol.')
  if supported(KFeatureIdMIPv4):
     addline(u'Mobile IPv4')
  if supported(KFeatureIdLandmarks):
     addline(u'location landmarks API included')
  if supported(KFeatureIdLocationFrameworkCore):
     addline(u'location basic services.')
  if supported(KFeatureIdCameraBurstMode):
     addline(u'Camera application supports burst mode.')
  if supported(KFeatureIdAvkonELaf):
     addline(u'UIs use Europe Look And Feel')
  if supported(KFeatureIdAvkonApac):
     addline(u'UIs use Asia Pacific Look And Feel')
  if supported(KFeatureIdMidi):
     addline(u'MIDI) sounds.')
  if supported(KFeatureIdMmcHotswap):
     addline(u'MMC hotswap.')
  if supported(KFeatureIdJapanese):
     addline(u'Japanese language variant.')
  if supported(KFeatureIdThai):
     addline(u'Thai language variant.')
  if supported(KFeatureIdUSSD):
     addline(u'Unstructured Suppelementary Service Data (USSB).')
  if supported(KFeatureIdChinese):
     addline(u'Chinese language variant.')
        

def display_unsupported():
  t.clear()
  addline('Your device doesnt support the following features :')
  if not supported(KFeatureIdMmc):
     addline(u'no memory Card.')
  if not supported(KFeatureIdCamera):
     addline(u'has no Camera Application.')
  if not supported(KFeatureIdCoverDisplay):
     addline(u'has no separate cover display.')
  if not supported(KFeatureIdVideoRecorder):
     addline(u'has no Video Recorder application.')
  if not supported(KFeatureIdQwertyInput):
     addline(u'has no qwerty keyboard.')
  if not supported(KFeatureIdFlightMode):
     addline(u'flight mode.')
  if not supported(KFeatureIdOfflineMode):
     addline(u'off-line mode.')
  if not supported(KFeatureIdOpenGLES3DApi):
     addline(u'3D graphics rendering.')
  if not supported(KFeatureIdIrda):
     addline(u'Infrared.')
  if not supported(KFeatureIdBt):
     addline(u'Bluetooth.')
  if not supported(KFeatureIdUsb):
     addline(u'USB.')
  if not supported(KFeatureIdBtFaxProfile):
     addline(u'Bluetooth fax profile.')
  if not supported(KFeatureIdBtImagingProfile):
     addline(u'bluetooth imaging profile.')
  if not supported(KFeatureIdIm):
     addline(u'Instant Messaging.')
  if not supported(KFeatureIdPresence):
     addline(u'Presence.')
  if not supported(KFeatureIdSyncMlDm):
     addline(u'SyncML device management standard.')
  if not supported(KFeatureIdSyncMlDs):
     addline(u'SyncML data synchronization standard. ')
  if not supported(KFeatureIdSvgt):
     addline(u'2D vector graphics SVGT')
  if not supported(KFeatureIdAudioEffectsApi):
     addline(u'audio effects.')
  if not supported(KFeatureIdAudioResourceIndications):
     addline(u'Audio Resource Indications')
  if not supported(KFeatureIdEqualizer):
     addline(u'equalizer.')
  if not supported(KFeatureIdProtocolGsm):
     addline(u'GSM cellular stack.')
  if not supported(KFeatureIdProtocolWcdma):
     addline(u'WCDMA cellular stack')
  if not supported(KFeatureIdProtocolCdma):
     addline(u'CDMA cellular stack.')
  if not supported(KFeatureIdCsVideoTelephony):
     addline(u'circuit switched video telephony.')
  if not supported(KFeatureIdQos):
     addline(u'Quality of Service.')
  if not supported(KFeatureIdIpsec):
     addline(u'IP Security for VPNs')
  if not supported(KFeatureIdMIPv6):
     addline(u'Mobile IPv6.')
  if not supported(KFeatureIdProtocolWlan):
     addline(u'WLAN protocol.')
  if not supported(KFeatureIdSipStack):
     addline(u'SIP protocol.')
  if not supported(KFeatureIdMIPv4):
     addline(u'Mobile IPv4')
  if not supported(KFeatureIdLandmarks):
     addline(u'location landmarks API not included')
  if not supported(KFeatureIdLocationFrameworkCore):
     addline(u'location basic services.')
  if not supported(KFeatureIdCameraBurstMode):
     addline(u'Camera application supports burst mode.')
  if not supported(KFeatureIdAvkonELaf):
     addline(u'UIs dont use Europe Look And Feel')
  if not supported(KFeatureIdAvkonApac):
     addline(u'UIs dont use Asia Pacific Look And Feel')
  if not supported(KFeatureIdMidi):
     addline(u'MIDI sounds.')
  if not supported(KFeatureIdMmcHotswap):
     addline(u'MMC hotswap.')
  if not supported(KFeatureIdJapanese):
     addline(u'Japanese language variant.')
  if not supported(KFeatureIdThai):
     addline(u'Thai language variant.')
  if not supported(KFeatureIdUSSD):
     addline(u'Unstructured Suppelementary Service Data (USSB).')
  if not supported(KFeatureIdChinese):
     addline(u'Chinese language variant.')
     
def display_exotic():
  t.clear()
  addline('exotic server infos :')
  addversion('win',win_server_version())
  addversion('bitmap',bitmap_server_version())
  addversion('dbms',dbms_server_version())
  addversion('file',file_server_version())
  addversion('comms',comms_server_version())
  addversion('tel',tel_server_version())
  addversion('socket',socket_server_version())
  addversion('discovery',discovery_server_version())

  
  
t=appuifw.Text()
appuifw.app.body=t
lock=e32.Ao_lock()
appuifw.app.menu=[(u'Supported features',display_supported),
                 (u'unsupported features',display_unsupported),
                 (u'exotic infos',display_exotic)]
lock.wait()
Cyke64

links :
feature module 1.1 for 3rd (selfsigned) EDIT : has been fixed and also updated to 1.1 !

feature module 1.1 for 3rd (unsigned) EDIT : updated to 1.1 !
My other modules !


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Last edited by cyke64 : 2007-02-03 at 19:43. Reason: updated to 1.1 version !
Reply With Quote

#2 Old Re: [announce] feature module for 3rd - 2007-02-02, 18:43

Join Date: Feb 2006
Posts: 523
Location: Brazil
Send a message via MSN to alb3530
alb3530
Offline
Super Contributor
Could you explain a thing to me?Won't it always be better downloading self-signed files when available, instead having to sign an unsigned file?

I couldn't install your module :S
http://i9.tinypic.com/2rrxev9.png
Reply With Quote

#3 Old Re: [announce] feature module for 3rd - 2007-02-02, 20:34

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by alb3530
Could you explain a thing to me?Won't it always be better downloading self-signed files when available, instead having to sign an unsigned file?
I couldn't install your module :S
http://i9.tinypic.com/2rrxev9.png
Have you PyS60 dev cert free installed or PyS60 selsigned on your phone
With selfsigned package no problem you can use my feature selfsigned

self-signed files must be used with self-signed PyS60 1.3.17 package

unsigned files with all capabitilites for dev cert free must be, before used with YOUR unsigned PyS60 1.3.17 package , SIGNED with your own certificate (registered in symbiansigned site !)

I can't sign this unsigned feature module for you !!! You have to sign this file yourself ...

I hope that these explanation can help you a little !

Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#4 Old Re: [announce] feature module for 3rd - 2007-02-02, 23:36

Join Date: Feb 2006
Posts: 523
Location: Brazil
Send a message via MSN to alb3530
alb3530
Offline
Super Contributor
Quote:
Originally Posted by cyke64
Have you PyS60 dev cert free installed or PyS60 selsigned on your phone
With selfsigned package no problem you can use my feature selfsigned
PyS60 dev cert free?Do you mean that PC application that can be downloaded in symbiansigned website?

anyway, i have selfsigned version of pys60, and i tried to install selfsigned sis of features module, but it's not possible due to that error you saw at screenshot
Reply With Quote

#5 Old Re: [announce] feature module for 3rd - 2007-02-03, 11:27

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by alb3530
Could you explain a thing to me?Won't it always be better downloading self-signed files when available, instead having to sign an unsigned file?

I couldn't install your module :S
http://i9.tinypic.com/2rrxev9.png
Your screenshot show this message : Required application access not granted
And this means :
Check that your certificate can be used to sign all capabilities needed by your application. For example, if you use self-signed certificate, you can only sign basic set capabilities, i.e. NetworkServices, ReadUserData, WriteUserData, LocalServices and UserEnvironment. If your application requires one of the extended capabilities, for example SwEvent, you cannot sign it with self-signed certificate. In this case, apply for developer certificates from Symbian Signed.

I'm sorry I made an error and give too many caps to selfsigned feature module !
Now this selfsigned version has been fixed so try it again

Thanks for your feedback (I only use cert free cert because I want more power ) !

PS : I voted like you in the poll for asking for hex editor in x-plore

Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#6 Old Re: [announce] feature module for 3rd - 2007-02-03, 19:44

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
hello ,

Now feature has been updated to 1.1 version for displaying some 'exotic' infos

Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#7 Old Re: [announce] feature module for 3rd - 2007-02-04, 14:54

Join Date: Feb 2006
Posts: 523
Location: Brazil
Send a message via MSN to alb3530
alb3530
Offline
Super Contributor
I've tested and it worked now.But i just want to mention that, right after installing the fixed sis file, i quoted your first post using Opera, in order to copy the example script, and pasted it in a file using X-plore.Then Python gave me an error in first line.So i decided to use PPeditor to paste the script and it worked.I think X-plore pasted the script in unicode, cause the file created by it had double size comparated to that one created by PPeditor.

Quote:
Originally Posted by cyke64
PS : I voted like you in the poll for asking for hex editor in x-plore

Cyke64
Many thanks, your help is very important
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
[announce] sysagent module cyke64 Python 7 2009-01-28 13:52
[announce] GREAT FEATURE : Sending flash SMS ! cyke64 Python 30 2008-08-23 20:52
[announce] cenrep module for 3rd cyke64 Python 20 2007-12-05 18:14
[announce] Call status and key press module agrauballe Python 21 2007-09-19 02:45
Carbide.j 1.5 and Netbeans 5.5 beta 2 ovjo12 Mobile Java Tools & SDKs 5 2007-06-11 06:43

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