Monday, April 30, 2007
J2ME server socket and camera API
MIDP 2.0 introduces support for running a local server using ServerSocketConnection, as well as support for camera capture (photo and video).
Friday, April 27, 2007
S60 Python (pys60) vs Python
Although pys60 provides a nice Python environment for phones, there are some small discrepancies to watch out for.
1) Different packages: e32 and graphics are available on the phone only. So you'll have to test on the device. You can check which OS the script is running on:
2) thread.start_new_thread() seems to freeze the v1.2 and v1.3.21 interpreter on the N95. The sample RssReader in the docs does use threading, so I'm not sure why it doesn't work for me.
3) sleep(): "In python for series 60, the use of e32.ao_sleep is encourage over time.sleep. AO stands for 'Active Object' approach to cooperative multi-tasking. When an object go to 'ao_sleep' other active objects can run."
1) Different packages: e32 and graphics are available on the phone only. So you'll have to test on the device. You can check which OS the script is running on:
import os
if os.name == 'posix': # OS X/Linux
path += "/"
elif os.name == 'e32': # Symbian
path += "\\"
2) thread.start_new_thread() seems to freeze the v1.2 and v1.3.21 interpreter on the N95. The sample RssReader in the docs does use threading, so I'm not sure why it doesn't work for me.
3) sleep(): "In python for series 60, the use of e32.ao_sleep is encourage over time.sleep. AO stands for 'Active Object' approach to cooperative multi-tasking. When an object go to 'ao_sleep' other active objects can run."
import e32
e32.ao_sleep(5) # sleep for 5 seconds
Thursday, April 26, 2007
Remote Display for Nokia S60 and Windows Mobile
For S60/S80/UIQ devices, SysOpenDigia's ImageExpo enables you to have a remote display on Windows or Mac. The pricing model is one licence per device, currently at 82 Euro/license. The installation instruction is a little sparse. For example, it doesn't explain that you need to install the phone app and then initiate the connection from the phone.
Other connectivity option are available on specific phone models. For example, the E-series and the Communicator 9x00 series support Screen Export, which supposedly allow you to send the screen directly over Bluetooth to a "compatible" projector. The N95 and N93 have TV-out.
For Windows Mobile, you can get the tools as part of the free, Windows-only SDK.
Other connectivity option are available on specific phone models. For example, the E-series and the Communicator 9x00 series support Screen Export, which supposedly allow you to send the screen directly over Bluetooth to a "compatible" projector. The N95 and N93 have TV-out.
For Windows Mobile, you can get the tools as part of the free, Windows-only SDK.
Wednesday, April 25, 2007
GSM + Python on S60
Python on S60 provides an easy API to access the attached GSM cell:
>>> import location
>>> loc = location.gsm_location()
>>> print loc
(310, 170, 270, 21001)
>>> import location
>>> loc = location.gsm_location()
>>> print loc
(310, 170, 270, 21001)
Useful Nokia Shortcuts
*#06# - IMEI Number
*#100# > Options > Send service command. (gives own number on some Networks)
*#92702689# - Life timer ?
*#2820# - Bluetooth Device Address
*#0000# - Firmware Revision (mine is v 5.0607.7.3 16/02/06 RM-42)
*#7780# - Soft Reset. (Restores ini files from rom but preserves user data (photos, 3rd party apps etc)
*#7370# - Hard Reset. (Reformats the C: drive. All applications and files stored on this drive will be lost and clean default files will be rewritten.)
*#100# > Options > Send service command. (gives own number on some Networks)
*#92702689# - Life timer ?
*#2820# - Bluetooth Device Address
*#0000# - Firmware Revision (mine is v 5.0607.7.3 16/02/06 RM-42)
*#7780# - Soft Reset. (Restores ini files from rom but preserves user data (photos, 3rd party apps etc)
*#7370# - Hard Reset. (Reformats the C: drive. All applications and files stored on this drive will be lost and clean default files will be rewritten.)
Tuesday, April 24, 2007
Loading Images Programmatically in Flash
This tutorial explains how to load images using the MovieClipLoader and how to grow its size when mouseover.
Watching for New Files in Python
Here is a comparison of three techniques in Python to watch for new files on Windows. The polling approach is portable across platforms.
Monday, April 23, 2007
Launching the Camera App from Flash Lite
The fscommand can be used to launch applications. For example, to launch the camera app on Windows Mobile 5 phones:
To find out the path to the camera app on your Nokia phone, try the 2 methods mentioned here.
fscommand("Launch", "\\Windows\\Camera.exe");
To find out the path to the camera app on your Nokia phone, try the 2 methods mentioned here.
Tuesday, April 17, 2007
Subscribe to:
Posts (Atom)