Header Sep
Symbian OS Tips, Tricks & Code
My Rating Score
Login to rate page

August 2005
Observing and logging to file different smartphone system events

[Back]

There are many smartphone system events that a Symbian OS application has to respond to, for example the keypad, the screen being tapped, going to background and so on.

This example application monitors chosen events, shows them on the screen and saves them to a log file. This application also catches special button events like the power, Internet, camera and jog dial. It is useful sometimes to check what really happens while an application is performing some functionality, and this example can be used as a base for testing.

Download example application>>

To run this application on a Sony Ericsson smartphone, here are a few instructions. The camera key is used to close the application, even when it is in the background. The Internet key is used to move the application back to the foreground, making sure that it is visible. The application can also catch QWERTY keyboard events if the text input functionality is enabled.

The user can choose to log events caught by the functions OfferKeyEventL and HandlePointerEventL. After logging a screen event to log file, the application continues handling this particular event. If there is too much information in the application list box, it can always be cleaned up by disabling an option (see screenshots below).

 

To build the Spy application example for a Sony Ericsson smartphone, use the following:

$ bldmake bldfiles
$ abld build thumb urel
$ makesis Spy.pkg

This example also has a small program (supply.bat) that can call these commands for you. You should edit it before first use to update paths, so they will reflect your folders.

 

My Rating Score
Login to rate page