Tag Archives: Sky-Explorer

Monday, 11 February, 2008

Sky Explorer Supports Unicode Filename

Unicode filename and path are supported in version 1.0.3

The symbian python os functions can accept utf8 string and will also return utf8 string (eg. in os.listdir). It does not use unicode string like in other native symbian functions.

Since the Sky Explorer code uses path.join to get the full path in a lot of places, I modified path.join to always return in utf8 string regardless of its input. In places that use python os functions, no other changes are needed to allow for unicode filename and path. In places that use native symbian functions which expect unicode string, a conversion from utf8 string to unicode string is needed. -- unicode(fname, 'utf8')

(in dir_util.py)

# this replaces os.path.join (encode p in utf8)

os_path_join = path.join

def path_join(a, *p):

return os_path_join((a and type(a) is unicode) and a.encode('utf8') or a,

*[(type(d) is unicode) and d.encode('utf8') or d for d in p])

if path.join is not path_join:

path.join = path_join

It will now support searching for unicode filename and can also search for unicode text in utf16 files.

Zip and unzip can support unicode filename and path, this is done by encoding the unicode filename in utf8. Though if you unzip such a zip file in windows OS, the filename and path will remain in utf8 string.

Unicode sms is supported using

messaging.sms_send(to, msg, 'UCS2')

Application tagging in unicode is also saved and restored correctly in the new version.

(The source codes are released in http://skyexplorer.googlecode.com/svn/trunk/ )

Feb 12, Download from http://skyexplorer.googlecode.com/svn/trunk/sis/skyexplorer_2ndEd_1.0.3.sis

or

http://skyexplorer.googlecode.com/files/skyexplorer_2ndEd_1.0.3.sis. (We're sorry page)

Tags: Nokia, Sky-Explorer, unicode, Python


Posted in Open-Source , Mobile , Sky-Explorer , Python


Thursday, 12 April, 2007

Getting Sky Explorer to Work on Symbian 3rd Edition

It is actually still quite confusing for me. :)

Firstly, Sky Explorer needs keycapture module which requires SwEvent capability. Refer S60 3rd Edition Development.

To sign the SIS file with SwEvent capability means that I need to get a symbian cert. Go to www.symbiansigned.com and get a free Symbian Developer Certificate. (need to download DevCertRequest tool to generate cert, the Developer cert can only be used in 1 phone by specifying 1 imei no.)

At first, I try to sign PythonForS60_1_3_20_3rdEd_unsigned_freedevcert.SIS with only the required capabilities, this doesn't work. So, I request another cert with all 13 capabilities included and sign with this and this works!

I am using Nokia Remote Device Access for testing, so when using a freshly generated cert, I need to change the phone's timezone to my timezone. :)

Next, I need to modify my code to know where it is (the path it resides in). In 3rd edition phone, it is in \private\<uid> (Sky Explorer uid is 0x2000A1C6, so the scripts will be in \private\2000A1C6), the application can know its own uid from appuifw.app.uid() and the sys.path will also contain this path, thus I can know the exact path. Good thing, this private path is writable for the owning application, so saving of preference and application tagging data requires no changes.

I have already written a python extension applist.pyd (view code)to retrieve the list of applications info from the phone and have already tested that it is working correctly in my 2nd edition phone with a slight modification. Getting it to work on 3rd edition isn't as easy though.

The applist module cannot be imported from the private dir !? The alternative is to make it go into the executable dir in \sys\bin . Since the py2sis script has an option leavetemp that allows us to tweak the installation path of each component in the pkg file, I think of using that. This turns out bad for 3rd edition sis, I kept getting errors from py2sis until I gave up! :-(

I then turn my attention to ensymble.py (Great stuff! Turns out to be my saviour! :) Get it from Ensymble development by Jussi Ylänen) to search for more options.

python ensymble.py simplesis --uid=0x2000A807 --version=1.0.0 applist APPLIST.sis

The simplesis command creates a sis file from the source dir applist preserving the path structure that applist contains. In this case, I should create a sys\bin subdir in applist and put the applist.pyd inside the sys\bin subdir. This creates the unsigned version.

python ensymble.py mergesis --cert=mycert.cer --privkey=mykey.key --passphrase=xxx SkyExplorer.sis 

APPLIST.sis SkyExplorer_v1.sis

The mergesis command merges several SIS files into one. The resulting SIS file is then signed with the certificate provided.

After this is done and installed, the applist module still cannot be imported! There is a permission denied error, check that applist.pyd is compiled to have same capabilities as this python interpreter process! So, although applist.pyd doesn't requires any capabilities, but in order for my program to load it, it will require the same capabilities as my program! Yes! This is the weird part! I am thinking what if another program also embeds the same module but it requires a different set of capabilities, so what will happen when this program is installed with the same module? The only way this can seem to work is if the module will acquire a union of the set of capabilities :roll:

python ensymble.py signsis --cert=mycert.cer --privkey=mykey.key --passphrase=xxx

--dllcaps=LocalServices+NetworkServices+ReadUserData+WriteUserData+SwEvent APPLIST.sis APPLIST_v1.sis

Use signsis command to sign APPLIST.sis with the same set of capabilities that I use for Sky Explorer and then use mergesis to merge into one and then try again. I confirm this finally works! (only on 1 phone)

python ensymble.py signsis --cert=mycert.cer --privkey=mykey.key --passphrase=xxx

--execaps=LocalServices+NetworkServices+ReadUserData+WriteUserData+SwEvent

skyexplorer_3rdEd_1.0.1.unsigned.sis skyexplorer_3rdEd_1.0.1.devsigned.sis

Note: use execaps option instead when resigning skyexplorer.

Download at http://code.google.com/p/skyexplorer/downloads/list

skyexplorer_3rdEd_1.0.1.unsigned.sis

APPLIST_3rdEd_1.0.unsigned.sis

pyemail_3rdEd_1.0.unsigned.sis

The SkyExplorer 2nd edition comes with the applist.sis.

skyexplorer_2ndEd_1.0.1.sis

Tags: Sky-Explorer, Python, installation, Nokia


Posted in Sky-Explorer , Python , Mobile


Saturday, 7 April, 2007

Nokia Remote Device Access

Forum Nokia has launched a Remote Device Access service. This enables developers to test applications on a wide range of Nokia devices based on Symbian OS over the Internet, free of charge. Daniel Rocha of Forum Nokia offers a personal view of the service at Symbianone.

I have tested Sky Explorer using the service since I don't have a 3rd edition phone to test on. It doesn't run yet!

You can access the service here.

Tags: Nokia, Sky-Explorer


Posted in Sky-Explorer , Mobile


Thursday, 15 March, 2007

Advanced navigation

The advanced navigation gives you a quick way to find the file you are looking for in a long list by entering the 1st character of the filename. The current selection is changed to the next item that starts with the character you have entered, If the search reaches the bottom of the list, it will continue the search from the top of the list until a match is found or the search hits the current selection. And, you can use the 2 keys input method to enter the character.

Tags: user-guide, Sky-Explorer


Posted in Python , Mobile , Sky-Explorer


Thursday, 15 March, 2007

2 keys input method

As its name implied, this is an input method that I devise for mobile phone using strictly 2 keys that combine to produce a character. I like my method more than the default phone input method, but the dictionary input method is obviously easier and faster than mine.

How is the method designed?

First, every possible character can be entered using a combination of 2 keys. After the 2nd key is entered, it will combine with the previous key to produce a character, so there is no waiting time needed. If it is an invalid combination, then it simply ignores both keys. And, if the time difference between the 2nd key and the 1st key is too long (>0.8s), it will ignore the 1st key and assume that you want to start with the 2nd key as if it is the 1st key.

Second, the method makes it easier for the more common or rather more frequently used alphabet characters to be entered. This means that the same key is pressed twice to produce the character. There are 8 characters in this frequently used group using the key from 2 to 9. There are 12 characters in the next less frequently used group that uses 2 different keys to enter with these 2 keys vertically next to each other. Lastly, there are 6 characters in the least frequently used group that uses 2 different keys, horizontally next to each other.

Keys

uses same key

The more frequently used group covering the 8 characters a,e,i,s,o,r,t,n.

Vertically 2 keys group

Vertically 2 keys group.

 

The 2nd key is either on top of or it is below the 1st key. Characters that are displayed at the bottom side of a number keypad square are entered using the 1st key it is displayed at, followed by using the key below it. Characters that are displayed at the top side of a number keypad square are entered using the 1st key it is displayed at, followed by using the key above it. Eg., 25=b , 52=l , 58=f

Horizontally 2 keys group.

Horizontally 2 keys group.

 

The 2nd key is either on the left or on the right of the 1st key. Characters that are displayed at the right side of a number keypad square are entered using the 1st key it is displayed at, followed by the key on its right. Characters that are displayed at the left side of a number keypad square are entered using the 1st key it is displayed at, followed by the key on its left. Eg., 21=z , 45=x , 54=j

All numbers keys can be entered using the number key itself followed by the # key. For entering a string of numbers, this is bad! So, we have a number mode that is invoked by the combination of *#

Once in number mode, a number key produces a number immediately. To switch back to normal mode, press the number mode combination of *# . There is also the uppercase mode for entering the same alphabets characters in uppercase. The uppercase mode is invoked by the combination of ## and thereafter only uppercase alphabets characters are produced. To switch back to normal mode, press the same mode combination of ## . In either of the 2 modes, you can press the other mode combination to enter the other mode.

The symbols are divided into 4 groups.

The group that starts with the 1st key using 1 are symbols that have a straight line shape. (most) The special case is the new line character displayed below as \n produced by a combination of 1*

1 symbols group

1 symbols group

The group that starts with the 1st key using 0 are symbols that have a curve shape. (most) The special cases are the tab character produced by a combination of 0* and the space character produced by a combination of 00 .

0 symbols group

0 symbols group

The group that starts with the 1st key using * are symbols that have a dot, quote or a short shape.

* symbols group

* symbols group

The last group starts with the 1st key using #. This group contains the remaining symbols and another 2 special cases, #6 is PageUp and #9 is PageDown.

# symbols group

# symbols group

And, this concludes the description of the 2 keys input method. If your phone has a qwerty keyboard, then there is really no need to learn this. Use this for fun and see whether you can memorize all of them easily. Last but not least, there is an usage of this method covered in the advanced navigation.

Tags: user-guide, Sky-Explorer, input-method


Posted in Mobile , Sky-Explorer , Python


Thursday, 15 March, 2007

Sky Explorer Settings

The following settings can be set:

  1. Email
  2. SmtpHost
  3. Timezone (eg. 8 )
  4. Text enter mode
  5. File exts-TextEditor(eg. py txt)
  6. Images directory

The Email setting is used as the email sender, the from email address. The SmtpHost is the mail server from which the email is sent through.

A timezone of GMT +08:00 is entered as 8. There is a problem here as this entry only accepts a number, so it cannot represents GMT +08:30. This setting is used when an email is sent.

Text enter mode setting has 2 choices: Normal, 2 keys. It defaults to Normal. The 2 keys input method allows me to test the input method in the programs's internal text editor. This simple text editor is used when sending SMS and opening files with certain file extensions being defined in the next setting. (*experimental*)

The File exts setting defines the file extensions that you want to open using the internal text editor. (*experimental*)

The Images directory setting defines where screenshot images are saved to. It defaults to E:\images

1st 3 settings

1st 3 settings

 

Last 3 settings

Last 3 settings

Tags: user-guide, Sky-Explorer


Posted in Sky-Explorer , Python , Mobile


Thursday, 15 March, 2007

Application menu and tagging

What is this? It is like the Nokia application menu, except that it is built within the program itself. The menus in the program is equivalent to the tags that you have tagged to an application.

Initially, none of the application is tagged, when you navigate to the Apps folder, you should see a list of applications. Now, you may not recognize them because what is shown is really the application filename. (The program doesn't know the name itself, it just gather from the file system all the available applications) You can launch the application either using the right arrow key or the selection key.

You will be able to find this program itself within the Apps list, it is listed as SkyExplorer. (Note: you won't be able to launch another instance of SkyExplorer) Let say, I tag SkyExplorer with Python,Utils (2 tags), each tag will now appear as a subfolder within the Apps folder, and if you navigate into each tag Python (or Utils), you will be able to see SkyExplorer listed within it and you can also see the other tag (as a subfolder). (Display is not refreshed immediately after tagging, you may need to navigate somewhere and then back again) Easier to understand with a diagram below, name with a * behind is displayed as a folder.

Basically, this gives you a way to organize your applications through tagging.

Apps*

|__Python*

| |___Utils*

| | |___SkyExplorer

| |___SkyExplorer

|__Utils*

| |___Python*

| | |___SkyExplorer

| |___SkyExplorer

|

..

|__SkyExplorer

Python apps

You can also search for application or tag name at any level in the application menu, the search is performed within the current tag (or folder). For eg. below, I search for Exp. It simply tries to search Exp within the application or tag names. (Yes, this is a bit different from the actual file searching and the display text is the same which is not right!)

Search for Exp

Search for Exp

 

Apps *Exp*

Apps *Exp*

And there is an Uninstall menu which will not immediately uninstall the selected applications. (The program doesn't know how, yet) But, it will just launch the Application manager. In fact, it is now hardcoded to run this \system\Apps\AppMngr\AppMngr.app if it exists in one of your phone's drive. You can inform me if your phone uses a different one or just don't use Uninstall at all.

For developers, the applications tags are saved into a python file named explorertag.py and is imported into the program when it starts. You can see my explorertag.py.

Tags: tagging, user-guide, Sky-Explorer


Posted in Sky-Explorer , Python , Mobile