Proceed to WirelessDevNet Home Page
Publications, e-books, and more! Community Tutorials Store Downloads, tools, & Freebies! IT Career Center News Home
newnav.gif

Newsletters
EMail Address:



   Content
  - Articles
  - Columns
  - Training
  - Library
  - Glossary
 
   Career Center
  - Career Center Home
  - View Jobs
  - Post A Job
  - Resumes/CVs
  - Resource Center
 
   Marketplace
  - Marketplace Home
  - Software Products
  - Wireless Market Data
  - Technical Books
 
   News
  - Daily News
  - Submit News
  - Events Calendar
  - Unsubscribe
  - Delivery Options
 
   Community
  - Discussion Boards
  - Mailing List
  - Mailing List Archives
 
   About Us
  - About WirelessDevNet
  - Wireless Source Disks
  - Partners
  - About MindSites Group
  - Advertising Information
 

The WDN Symbian DevZone... PersonalJava Training From SonyEricsson

by Richard Bloor, August 05, 2002

The Ericsson Mobility World site is gearing up for the release of the SonyEricsson P800, reported to be sometime in September. Amongst the material on the site is a training course introducing PersonalJava Development using Metrowerks CodeWarrior. This week Richard takes a seat in the SonyEricsson classroom.


If you have read the interview I conducted with Chris Davis at Metrowerks in June you may recall that one of the activities they are assisting SonyEricsson with was the preparation of training material. The first fruit of this endeavor has now become available in the form of the "Programming the P800 SmartPhone training course Programming the P800 SmartPhone training course" available on the Ericsson Mobility World site.

At first sight the posting of this PersonalJava training on the public part of the site seems an odd move. You can only get the full benefit if you have access to the CodeWarrior tools for the Symbian OS. However I believe the course can be completed without CodeWarrior and still offer value for anyone new to the UIQ or PersonalJava.




The course is designed to assist those already familiar with Java to understand how to develop PersonalJava applications on the P800. The course aims to do this by making the user familiar with the CodeWarrior IDE, UIQ Interface, Symbian’s implementation of Personal Java and its customization under UIQ. The course is delivered as an installation file that loads up a series of web pages. The install also includes a remove option that exemplifies the bulletproof nature of the course. The install adds an item to the start menu from which the course can be launched.

Guided Tour
The course starts with an overview of the content and outline of its objectives, before proceeding to take a tour of the essential elements of the CodeWarrior IDE. Although those familiar with CodeWarrior could skip this section there are a couple of Symbian specific items noted, such as not using spaces in file or path names, which makes it worth reviewing just to be sure. The process of creating a UIQ project based on project stationery is explained first along with the steps required to get the default Hello World application up and running.

The features of CodeWarrior are then reviewed in greater detail using the course’s sample application, PhotoApp. This section looks at:
  • the Project Manager highlighting the concept of a target, how files are handled and defining the link order
  • the editor’s facilities including searching, code browsing and comparing folders and code
  • target settings are then described in more detail and the reader guided to explore the range of setting available, and finally
  • the Debugger is examined with a discussion on how it can be controlled before looking at how the debug information is presented in the thread window, breakpoints are set and the content of variables and expressions examined.

There is also a brief pointer to how the UIQ emulator’s look and feel can be controlled.

UIQ on the P800 SmartPhone

The next topic looks at the implementation of UIQ on the P800. The phone hardware is summarized and the UIQ interface described briefly. The UIQ paradigm whereby requests from the operating system are the only actions that close applications is first introduced here.

The screen layout and user input mechanisms, the jogdial, touchscreen and text entry via keyboard simulator or handwriting recognition is examined. The controls and interactions, which are absent on the P800, such as a control key or double click, are also described.

Handling applications going into the background, a thread that runs through much of the remainder of the course, concludes the lesson.

QAWT.JAR
Here the course starts to take a look at code in some detail. The QAWT library provides a set of classes built on standard AWT classes, to make achieving UIQ look and feel in an application as straightforward as possible. After some final set-up work to ensure the sample application functions correctly the lesson steps through the sample code explaining the various aspects of QAWT used in the example. It covers the QFrame class and how it provides the applications with views, menus and methods to handle window events. Building menus, dialogues, views are explored then dealing with user interaction through tapping the screen and using the jogdial is introduced. The lesson also suggests various aspects of the applications behavior that are worth exploring further.

Symbian OS Utilities
The utility refers to two classes, TaskSwitch and NotFoundException. The TaskSwitch class is the one principally covered in this lesson. TaskSwitch provides a mechanism to allow your Java application to switch to another application running on the P800. The example shows how the PhotoApp can switch to the Calculator. Both an example of running the “switch to calculator” with the calculator not started and started are covered. This lesson is really a primer for the subsequent lesson that explores tasks switching in more detail.

Task Switching
This lesson develops on the previous one to look in some more detail at the process of switching between applications and more particularly the issues in correctly handling the switch in a Java application. The complication here is that Java code can detect many events which suggest the application is going to background or coming to foreground which do not actually mean that the application is moving from foreground to background or visa versa. The use of the method isBackground and the need to handle the detection of true application “to foreground” events in the application code are illustrated again with the PhotoApp.

JavaPhone Support
The section on JavaPhone is perhaps a little disappointing given the content of the preceding chapters as it really only provides an overview of the supported JavaPhone features and details of the limitations that exist with part of the implementation.

Course Conclusion
The course finishes with pointers to what will be added in future versions of the training, namely:

  • fully implementing an application under UIQ
  • downloading applications to the device itself, and
  • Internet based communications with a web server over GSM/GPRS

    References are also provided to background information on Java and a recommendation made for the “Wireless Java for Symbian Devices” book. In addition to the main course there is also a glossary and page with tool references including the Metrowerks CodeWarrior tools, Sun's Forte and Ericsson MIDP emulators.

    Overall the course is easy to follow and explains the key concepts of CodeWarrior and the P800 Java implementation well, if not rather briefly in some areas.

    Although the course material does not include any pointers to other relevant information on the P800 and UIQ you will have seen several when you downloaded the course from the Documentation section of the Symbian area of Mobility World. The other material is well worth reviewing, in particular the paper " Product Information - P800" which is one of the best and most through descriptions of a Symbian SmartPhone I have seen to date.

    Finally, while the tutorial is going to be of most value to developers who have signed up for the Beta QIU SDK CodeWarrior bundle, it can be followed without access to CodeWarrior and the SDK. It is perhaps worth noting that Symbian have announced that there will be a Java only UIQ SDK released later in the year. I understand that this could be available in late August and that it may be bundled with Metrowerks' CodeWarrior Wireless Studio Java development tool. For the smaller development shops and hobbyist it unfortunately appears that there is unlikely to be a “budget” version as there was with the Java only CodeWarrior tool for the Nokia 9210. However my contact has suggested that there are discussions underway which could result in a version whose price will make the CodeWarrior tools more accessible. If however you cannot wait then the Quartz V6.1 SDK is still available and supports the same PersonalJava and JavaPhone APIs as UIQ.


    About the “WDN Symbian Guy" Richard Bloor:
    Richard Bloor has 16 years experience in the IT industry. His earlier work was largely in design and development of commercial and manufacturing systems but more recently has focused on development and test management of government systems.

    Richard Bloor is the Mobile Applications champion at System Architecture consultancy Equinox of Wellington, New Zealand.

    Richard can be reached at rbloor@wirelessdevnet.com.

    Symbian DevZone Home
  • Sponsors

    Search

    Eliminate irrelevant hits with our industry-specific search engine!









    Wireless Developer Network - A MindSites Group Trade Community
    Copyright© 2000-2010 MindSites Group / Privacy Policy
    Send Comments to:
    feedback@wirelessdevnet.com