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:

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.

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)

GPS + Python on S60

Lots of code examples by Nick Burch.

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.)

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:

fscommand("Launch", "\\Windows\\Camera.exe");

To find out the path to the camera app on your Nokia phone, try the 2 methods mentioned here.

Thursday, April 12, 2007

Nokia Camera Photo Location

Nokia N90 stores photos taken by the built-in camera in "c:\Nokia\Images" using the phone's built-in memory and "e:\Images" on the memory card.

Tuesday, April 10, 2007

Launching Flash Lite v2.x Content on Nokia phones

There is a serious, documented issue with launching Flash Lite v2.x files (SWF) on Nokia phones. In short, v2.x content can only be launched by opening the SWF file within the v2.x players. If you just open the SWF file from the file browser, it will be played back by either the player in the ROM (typically v1.x) or you will get a "unknown file format" error. For more details, see the discussion at the Adobe forum and Nokia blog. One workaround is using the SWF2Go Professional tool (not free) to build an SIS installer.

On Windows Mobile 5, opening SWF files launches Flash Lite (v2.1) player as expected.

Flash Lite Examples

View hundreds of Flash Lite apps on Adobe Flash Lite Exchange.

Nokia Screen Resolution

Useful explanation of the various screen resolution of the S60 series and S40 series phones.

Monday, April 9, 2007

Remote Nokia Device Testing

Want to test your app on as many phone models as possible without spending lots of $$$? Nokia just opened up their Remote Device Access service for free to the registered Nokia developers. There are a few limitations: for example, no SIM cards are provided so no messaging (SMS/MMS) is supported and only devices that are WiFi capable are networked.

Monday, April 2, 2007

Flash Lite 3

The mobile flash player, Flash Lite 3, is "expected to be available in the first half of 2007". The major feature it introduces is support for the Flash Player video format, which ensures video format portability across phones. Compared to Flash Lite 1.x and 2.x, the formats they currently support are only those natively supported by the phones.

I hope FL3 will also introduce access to some fundamental functionalities to the underlying mobile phones, such as API for the camera, bluetooth, SMS, etc., eliminating the need to write platform specific workarounds. This will make FL3 a much more exciting platform beyond games and multimedia players.