Introduction
Java on the Symbian OS
Author: Jonathan Allin
This chapter provides an introduction to Symbian's Java technology. It takes an inward look at the history behind Symbian's Java
development and why Symbian regards Java as such an important technology.
1. The Symbian story
The Symbian OS incorporates a comprehensive set of leading-edge applications and services that will set the standard for the wireless
revolution. But where did it come from and why is it the best software platform for an emerging market of wireless information devices, or
WIDs?
Symbian is jointly owned by Nokia, Ericsson, Motorola, Matsushita (Panasonic) and Psion. Its many other licensees include Philips, Sanyo,
Siemens, Kenwood and Sony. The nucleus of the company was formed from Psion Software, and today’s Symbian OS is an evolution of
Psion’s EPOC Release 5 (sometimes referred to as ER5), which appears in the Psion Series 5mx, Revo and netBook/Series 7.
Building a software platform for the wireless industry
History
In mid-1994, Psion began work on a new 32-bit operating system (OS) to replace SIBO, its sixteen-bit operating system. Products based
on SIBO were a great success and included the Psion Series 3a, Series 3c, Siena, and Series 3mx, the last of which was launched in 1998.
The platform supported internationalization with a full Unicode implementation on a 32-bit flexible architecture. The new OS was called
EPOC, a name that reflected the intention to define a "new epoch" in wireless information devices.
Right from its inception, Psion intended that the EPOC operating system should support a commercial licensing model. The entire software
team working on EPOC, plus a sales team, were formed into a new company called Psion Software in June 1996. Its mission was to license
EPOC to original equipment manufacturers (OEMs) outside the Psion Group. While EPOC was suitable for a wide range of applications,
the sales group decided that its sweet spot was the mobile phone market. Its design supported the flexibility that would allow EPOC to be
licensed to the many telecommunications OEMs who could then build innovative products based on it.
Psion’s timing was good. In the mid-1990s, the mobile phone revolution was in full swing. Well-positioned in the harmonized GSM (global
system for mobile communications) markets of Europe, Psion was also able to watch market development in the USA and Japan. It was
clear that mobile communications and computing markets were converging, just as they had with the fixed Internet.
Parallels
Even as Psion began building EPOC, Nokia, market leader in the mobile handset market, introduced the Nokia 9000 Communicator in late
1996. The Communicator used the GEOS operating system from Geoworks Inc. Here was proof of concept: a combined GSM phone and
personal data assistant (PDA), and an unexpected opportunity for Psion. Nokia had used GEOS to spare it the effort of writing all the PDA
software, but GEOS, like SIBO, was limited by a 16-bit architecture. EPOC was the logical next step.
By early 1998, as Psion Software's sales group made steady progress licensing EPOC to the phone handset manufacturers, a new idea
emerged. If Psion Software was an independent company, outside of the Psion Group, and owned by the mobile handset manufacturers,
then the latter would own a strong technology asset that would enable them to boost the entire market for wireless information devices.
On June 24, 1998, the new company, Symbian Ltd, was announced to the world. Colly Myers, who had helped develop EPOC, was
announced as Chief Executive Officer. Symbian’s owners would be Psion, Nokia and Ericsson. Motorola announced its intention to join the
alliance, and did so formally from October 1998. Japan's Matsushita, better known as Panasonic, joined in May 1999.
Symbian, owned by the world’s leading telecommunications manufacturers, is now a global company with offices in London and Cambridge
in the UK, Silicon Valley in the USA, Ronneby in Sweden, and Tokyo in Japan. There are now more than 700 employees worldwide.
EPOC Release 5 was formally launched in June 1999. It was a single reference design for devices based on a 640 x 240 pixel screen, pen
and keyboard, although it was adapted for a VGA screen in Psion's netBook.
The advanced client
Psion’s success licensing EPOC was because of the OS’s inherent suitability for the wireless environment. The most effective wireless
operating system will make the least use of wireless infrastructure. Wireless networks will not provide blanket next-generation (2.5G/3G)
coverage in the near future, nor will they offer the reliability of wireline ones. As a result, mobile devices must negotiate different amounts of
bandwidth and may even lose connection altogether, which means switching between modes while using a service.
A WID will need to switch not only between 2.5G and 3G in packet-switched mode, but might occasionally need to negotiate legacy
circuit-switched 2G networks, which require dial-up. WDP protocols such as SMS would allow continuous service, whatever the network
or bandwidth. Figure 1 illustrates that bandwidth cannot be guaranteed in the air as it is terrestrially, so that wireless applications must cope
with variations in bandwidth, as well as possible delays in data delivery. This may mean that an application must preserve data where
appropriate and send or receive it when network coverage is restored.

Figure 1. Symbian devices are not feature phones running micro-browsers but advanced client portable computing systems,
delivering useful applications in a sometimes unpredictable network environment.
The advanced client will retain its rich functionality when there is no coverage by processing its information locally. This approach maximizes
the value of airtime used by the network subscriber and allows efficient management of limited battery life. These key attributes were what
mobile manufacturers were looking for: power-efficiency; the ability to operate when wireless connections are lost; and that benchmark of
the telecoms industry, the "five nines", 99.999% efficiency. The last point is a significant advantage of the Symbian OS – WIDs must be
"always-on", which means they must almost never crash, never lose their data, and be able to handle a variety of service requirements as and
when required. This is the kind of robustness embodied by Symbian’s advanced client. Symbian has also adopted three key technologies
that reflect industry-wide standards, further strengthening the Symbian OS proposition. These are WAP, Bluetooth, and, of course, Java.
The Symbian OS
Ericsson's R380 became available in September 2000. This is Symbian's first Smartphone.

Figure 2. The Ericsson R380, Symbian's first Smartphone
Symbian has developed three reference designs for licensees, divided into:
- Smartphones, primarily for voice communication, with PDA-like sophistication that allows information to be rapidly accessed and
reviewed
- Communicators with a PDA’s form-factor and fully-integrated communications including voice. Entering information on these devices
is straightforward using pen or keyboard
Communicators include two Symbian reference designs, code-named Crystal and Quartz. Crystal is the evolution of the Psion Series 5 into
the product category defined by the Nokia 9000 Communicator. Its most recent incarnation is the Nokia 9210, based on Version 6.0,
announced in November 2000.

Figure 3. The Nokia 9210, based on the Crystal reference design
Quartz is a pen-based tablet device with integrated telephony. With its half-VGA sized screen it is designed to fit comfortably into the palm
of your hand.

Figure 4. The Ericsson Communicator concept, based on the Quartz reference design
The Crystal and Quartz user interfaces (UIs) can be customized by Symbian licensees to give their products an individual "look and feel".
The Smartphone reference design allows manufacturers still more product differentiation. It also comes with a standard UI, but gives
licensees far greater freedom to customize applications and UI.

Figure 5. Symbian’s Smartphone reference design
Version 6.0, as used in Nokia's 9210 and Ericsson's concept Communicator, provides some important enhancements to EPOC Release 5.
These include:
- the Quartz and Crystal reference designs for direct integration into real devices. Underneath the hood the GUI system has been
restructured into several cooperating components, making it simpler for a Symbian licensee to adapt the look-and-feel to meet their
particular requirements
- integrated wireless telephony for single box Communicators and Smartphones, which seamlessly combine voice and advanced data
functionality
- Bluetooth technology
- WAP browsing
- security, including full-strength encryption and certificate management, integrated into communications (SSL, HTTPS, WTLS) and
application installation
- full international locale support: EPOC C++ now uses 16-bit Unicode characters rather than 8-bit narrow characters. Text formatting,
text input, and font management systems have been amended to support a wider range of locales
- new connectivity package, Symbian Connect, providing increased usability
- a media server with support for several audio and image formats
- new toolchain supporting ARM4 and Thumb instruction sets, an ARMI interworking binary standard, improved GCC compiler, and
more convenient program building
- Java enhancements: implementations of PersonalJava PJAE 1.1 and JavaPhone 1.0, and performance improvements.
The Crystal and Quartz reference designs are discussed in Chapters 2 and 3 of the book.
2. Why Java?
There are several choices of language for developers programming for the Symbian OS, which include C++, Java and, on the content side,
WML and HTML. Programming with C++ is expected to appeal to OEMs, including Symbian licensees, for the design of application
engines. Java is expected to become the preferred language for the programmer community when developing applications across the whole
range of Symbian licensee devices (SLDs). Java offers a powerful programming environment and key Symbian technologies – telephony,
contacts-management, and Datagram messaging (all relevant to games and value added services) – are exposed through the JavaPhone
APIs, which are detailed in Chapter 5. Furthermore, Java applications can also be adapted to have the look-and-feel of Symbian’s
Smartphone and Communicator reference designs, as we mentioned earlier.
The Symbian OS provides a full Java implementation within the Java 2 Platform, Micro Edition (J2ME) framework. This includes
PersonalJava and the first JavaPhone implementation for wireless devices. The PersonalJava implementation is extensive, including all
mandatory features and most optional features defined in the PersonalJava Application Environment (PJAE) specification.
The revenue from WIDs will be generated by wireless services enabled by these devices, rather than through the actual sale of the device.
Java will be an important, perhaps essential, enabler for these services. Throughout this book, we will be discussing the relationship between
the Java environment and wireless services.
The most significant benefits of the Java language, probably in order of importance, are these:
- security
- standardization
- robustness
- device independence
- fast development
2.1 Security
Security is crucial to the success of wireless devices.
Wireless services depend on the secure delivery of trusted applications and the secure exchange of information. Security was, and is, one of
Java's critical design goals, and it is built into Java from the ground up. Features such as the byte code verifier, prevention of random
memory accesses, and disallowing inappropriate casting, ensure that Java can be used to develop secure systems. Achieving the same
watertight security with other languages is difficult, if not impossible. We'll look at security in more detail in Chapter 10.
2.2 Standardization
Numbering over 2 million, skilled Java developers have overtaken skilled C++ programmers. As a consequence, a wide range of
development tools, documentation, books, technical support, and training is available. Java is the preferred teaching language, and certainly
the preferred object-oriented (OO) language, in an increasing number of computer science courses.
2.3 Robustness
Java code can be developed more quickly and is easier to maintain than C++ code and at the same time is likely to be more robust and
contain fewer faults than the equivalent C++ code.
Fewer faults
Here's an example. This snippet of C++ code is intended to reverse the contents of an array, ar:
#include
void reverseArray(int ar[])
{
if(ar = NULL) return;
unsigned int len = sizeof(ar);
for(unsigned int index = len-1; index >= 0; index--)
{
int temp = ar[index]; ar[index] = ar[len-index-1];
ar[len-index-1] = temp;
}
}
The example is based on a genuine piece of code. It actually contains four mistakes: three are coding errors and the fourth is an algorithmic
error. These are mistakes that won't generate compiler errors but will cause runtime errors. Let's go through them.
The code if(ar = NULL) return; is intended to check that ar is a valid array. However, because the assignment operator has been
used rather than the equality (==) operator, ar will be set to null. This is interpreted as boolean false so that the program will carry on with
ar equal to null.
sizeof(ar) was expected to return the number of elements in the array. In fact it returns the size of an object in bytes, so at best it will
return the size of the array in bytes, not the number of elements. However, even though ar[] looks like an array, it is actually a pointer.
Therefore sizeof(ar) will return the size of a pointer, which is typically four for a 32-bit machine.
The third mistake arises because an unsigned integer, index, was used for the loop counter. This means that index will never go negative
and therefore the loop won't terminate.
The last mistake is a design error. The number of times the code was intended to go through the loop is equal to the number of elements in
the array. But think about an array of five elements: I want to swap the first with the last, the second with the second to last, and the third, or
middle element, can stay where it is. In other words, I want to make two swaps, not five!
This is the equivalent Java code:
void reverseArray(int[] ar)
{
if(ar == null) return;
int len = ar.length;
for(int index = len-1; index >= 0; index--)
{
int temp = ar[index]; ar[index] = ar[len-index-1];
ar[len-index-1] = temp;
}
}
The Java compiler expects the argument of an if statement to be a boolean: therefore I have to use the equality operator. Java arrays are
first class objects and so ar.length will return the number of elements in the array. Primitive types in Java (bytes, ints, longs) are always
signed, so my loop counter will go negative.
I've removed three out of four faults by using Java, leaving me to concentrate on the algorithmic error. Arguably a fourfold improvement in
productivity!
Less code to write
Java applications also require fewer lines of source code. The following Symbian OS C++ code sends the message "Hello Imperial" to the
server 193.63.255.1 (which belongs to Imperial College in London) on port 7, which is the echo port. The code then reads the echoed
reply:
RSocketServ ss;
err=ss.Connect();
RSocket sock;
err=sock.Open(ss, KAfInet, KSockStream, KUndefinedProtocol);
const TInt KEchoPort = 7;
TInetAddr imperial(INET_ADDR(193,63,255,1), KEchoPort);
TRequestStatus stat;
sock.Connect(imperial, stat);
User::WaitForRequest(stat);
TBuf8<14>text = _L("Hello Imperial");
sock.Write(text, stat);
User::WaitForRequest(stat);
sock.Read(text, stat);
User::WaitForRequest(stat);
sock.Close();
Although this is EPOC C++ code, WIN32 code is very similar. Here's the equivalent Java code:
Socket socket = new Socket("193.63.255.1", 7);
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
DataInputStream in = new DataInputStream(socket.getInputStream());
out.writeUTF("Hello Imperial");
String echoedText = in.readUTF();
socket.close();
Not only is the code shorter (6 lines versus 14), but it's a lot clearer as well.
This isn't quite the end of the story. Java byte code itself is compact so that in general a line of Java source will generate less code than a line
of C++. This is because instructions like add, new, etc. are expressed as single byte codes whereas the C equivalent will expand into word
instructions or multiple instructions. On the other hand, we need to be aware of the higher overhead associated with each Java class.
The benefits of smart arrays and automatic garbage collection
Robustness is also achieved through two other important features: smart arrays and automatic garbage collection.
The absence of pointers and the use of Array objects means that Java code cannot point to either a non-existent object or to the wrong sort
of object. It is too easy in C++ code to write or read from an incorrect area of memory (e.g. off the end of an array). The real problem is
that the mistake won't be identified immediately but can generate apparently unrelated misbehavior, frequently a crash, hours or even months
later. If a Java application attempts to access an inappropriate object, or access a non-existent element in an array, an exception will be
thrown immediately that identifies both the cause of the problem and where in the source code the problem occurred.
Java's automatic garbage collection means fewer, or no, memory leaks. In C++ we must be careful to match object construction with object
destruction: failing to destroy an object results in a memory leak, attempting to destroy an object twice will cause the program to crash. (As
in C++, we must ensure that our Java code doesn't keep hold of references to unwanted objects: such objects cannot be garbage collected
and will effectively cause a memory leak.)
Java is not a complete answer to porting and device independence, but is almost certainly the least painful. This is because Java is inherently
device agnostic: the same binary will run on a MIPs processor or an ARM processor; it is relatively easy to port: APIs in general are simpler
and UI APIs are standard; and the code is generally simpler and there's less of it.
2.4 In summary
By combining a large developer community, a fast development environment, and a secure and robust execution environment, new services
can be deployed rapidly and safely onto a wide range of devices. The fruit of this union is added value and differentiation for the service
provider.
Nonetheless, Java should not be seen as a silver bullet. Java applications, especially poorly written ones, can be slow; and in general they
won't have full access to a platform's resources.
Speed is not a problem on desktop machines. Lots of MIPS (millions of instructions per second) and lots of memory for JIT (just-in-time)
compilers mean that nowadays a Java application feels just as crisp as an application written in C++. Speed is, however, an issue on small
devices, where memory is tight and CPU performance limited. Personal Java and J2ME technologies provide certain performance and
memory improvements (see Chapter 14), and we will look in depth at how you can write leaner and meaner Java applications in Chapter 8.
Java has restricted access to a device's resources. For instance, a pure Java application running on a Symbian device won't have access to
GUI (graphical user interface) controls such as command buttons or date editors, or to EPOC data types such as Word, Sheet, DBMS or
Agenda documents. JavaPhone (which we'll discuss in Chapter 5) opens up considerable Symbian OS functionality to Java applications.
Other areas can be addressed by design guidelines or classes provided by Symbian's developer support or by third parties. Some features,
in particular GUI controls that aren't also used by the AWT, are difficult to access.
3. Where does the Symbian OS fit in?
If developers, licensees, and network operators are convinced that they should be developing in Java, why should they choose the Symbian
OS rather than any other platform running Java?
The answer is in the added value provided by the Symbian OS:
- Symbian devices do not rely on being connected to a network to offer users applications and services. Devices will continue to
provide intelligent capabilities even when disconnected
- integration of Java with the Symbian OS will continue. Application engines, GUI controls, communications protocols, and other
Symbian OS facilities are becoming increasingly accessible to the Java developer
- Symbian's Java implementation is robust. It builds on the Symbian OS, which is itself designed to operate 24 hours a day, 7 days a
week
- Symbian's Java implementation is fast. Symbian has optimized, and continues to optimize, both the Java virtual machine port and the
Java libraries. The result is probably the fastest Java implementation in its class
- the implementation has a tight footprint, taking advantage of the "lean and mean" philosophy of the Symbian OS.
3.1 A bit of history
Porting Java to the Symbian OS began in February 1997. Symbian obtained a source license from Sun for JDK 1.1.2, which arrived in the
form of 32 megabytes (MB) of C and Java source code. Most of the code was a generic core, but there were platform-specific areas that
required tailoring in the application layer, the Standard C library, and the virtual machine.
The mismatch between EPOC and POSIX
The first hurdle to overcome was the mismatch between what was available on EPOC (the early name for Symbian OS) and what Sun
assumed was available. The source code was organized for ANSI C and POSIX and assumed process-wide file handles usable by any
thread, while EPOC file handles are thread-relative. There is no standard thread applications programming interface (API), so inevitably
work had to be done to match the EPOC thread APIs and its active-scheduler model to a multi-threaded model.
Overcoming these problems required a partial implementation of the Standard C library (STDLIB), which drives the relevant EPOC C++
APIs, to handle the ANSI C and POSIX areas. It was also necessary to develop a CPosixServer thread to own the thread-relative file
sessions (RFs) and RFile handles, a sockets API on top of ESOCK, a limited C++ API for asynchronous IOCTL, and a variation of the
Unix select() function to work on a single file descriptor. 64-bit integer arithmetic was handled by the GNU C++ compiler on EPOC
hardware and by Microsoft's Visual Studio for the Emulator. Java monitors are implemented using a variation on the RCriticalSection
class, which avoids the full cost of an RSemaphore::Wait() and RSemaphore::Signal() if the object is not currently locked. Further,
the Java virtual machine (VM) widely uses writeable static data, which is not generally available to an EPOC DLL. This meant the build tools
had to be modified so that the static data could be relocated at link time.
"Hello world" ran on July 24, 1997.
Implementing the AWT
Implementing the AWT was the second hurdle. Being pen-based, the Symbian user interface is quite different to Windows and Motif.
EPOC peer classes were written in Java and an EPOC C++ layer developed to package up the arguments and pass the calls through to an
AWT server. It is this server that does the real work: it has access to the EPOC's GUI environment (known as CONE) and all the
necessary handles, and has responsibility for converting input events into Java events.
The GraphLayout Applet from Sun's JDK ran on October 15, 1997.
But there were still problems. The AWT server was originally known to Java; however, this could cause deadlocks during garbage collection
and so was redesigned as a secret thread. Problems with memory leaks and further problems with garbage collection were also overcome.
Optimization
Hurdle number three was also opportunity number one: optimization to ensure that Symbian's Java implementation performed well. The core
of the byte code interpreter, a big switch statement in C code, was rewritten in ARM assembler. The more commonly used classes are
pre-loaded: this reduces the RAM (random access memory) required and improves start-up time, though can increase the ROM (read-only
memory) needed.
Finally, C++ classes and functions were written to generate the common assembler elements used by the byte code interpreter instructions.
This makes it straightforward to try out new code or algorithms for these elements and to take advantage of the optimizations that ARM
assembler can provide.
Development moved from JDK 1.1.2 to JDK 1.1.4, and on June 19, 1998, the JDK 1.1.4 version of the GraphLayout Applet ran
successfully.
Certification
Obtaining certification was the fourth hurdle. The Java certification kit contains some 31,000 files and defines 6,000 individual tests. The
validity of some of these tests had to be negotiated, for instance those that made too generous assumptions about the amount of memory
available. The test harness, written in Java, drove multiple slave machines. Typically, four machines were used, which allowed a test run to
complete in about a day.
Java certification was obtained on August 24, 1998.
Integration and EPOC Release 5
The final hurdle was integrating Java into EPOC. Java had to be integrated into the Web application to allow Applets to be run and, because
Java applications are generally started from a command line, an application launcher was required. Java applications on the Symbian OS
need a document UID (unique ID) and class names or titles should appear in the task list. Tools to package Java applications for EPOC
deployment were also developed.
The first Symbian runtime for Java was included in EPOC Release 5, which became available in May 1999. The first Symbian SDK for Java
was released at the EPOC World conference in June 1999.
JavaPhone
The wJava (wireless Java) working group was formed in October 1998 to develop the JavaPhone 1.0 specification (this was pre-JSR
days). Symbian began implementation in October 1999, though the specification wasn't finalized and published until March 2000. The
implementation was completed in May, though getting a full test pass was difficult as the many EPOC services that it relied upon were being
actively developed at the time. The first full pass was achieved on September 6, with final release on October 16.
The specification was evolving as development progressed, and in particular a number of problems with the specification were only
discovered once serious testing started. There was no official test suite for JavaPhone and so the developers had to write their own.
JTAPI was implemented without access to a true telephony platform. Up to that time, EPOC was "two-box" based, with the telephony
implementation using AT commands to drive a GSM mobile phone. None of the interesting JTAPI behavior (voice calls, networks etc.) had
been implemented and so the team had to rewrite and extend the generic "GSM" TSY to support JTAPI as best as possible.
In Fall 1999, EPOC server behavior was changed to allow multiple threads to use the same client-side resource/handle. This allowed a
simpler and more efficient implementation of the JavaPhone APIs that used EPOC services such as Addressbook, Calendar, JTAPI, and
Datagram.
Personal Java (Symbian OS v6.0)
The Personal Java code arrived on March 19, 1999. The basic port to EPOC Release 5 went quickly: HelloWorldApp and
EmbeddedCaffieneMark ran on May 7, 1999, and GraphLayout on May 12. The first Unicode build ran shortly after, though the internal
VM interface was still narrow. The internal interfaces such as STDLIB were ported to Unicode in June and the AWT ported to UIKON
(from EIKON) in July. The Thumb build of the JVM was made in October, with a full pJCK pass on the emulator and Thumb achieved on
January 16, 2000. A round of bug fixing followed, with final release in July 2000.
And products…
The Version 6.0 Quartz SDK for Java was released at Symbian's DevExpo in November 2000. The first Version 6.0 hardware platform for
Crystal was Nokia's 9210 Communicator, launched at the Nokia Mobile Internet Conference just three weeks later. By March 2001,
Symbian had unveiled its platform for GPRS-enabled Smartphones and Communicators, incorporating support for WAP 1.2 and advanced
Bluetooth technology. This provides all the building blocks necessary to create services and applications for wireless devices running on
GPRS networks. Version 6.1 products are scheduled to ship from H3, 2001, with the next Quartz SDK shipping in the third quarter of
2001.
It's interesting to note that the front-ends for tools such as AIF builder and the CS Help Compiler are written in Java. So even C++
developers are now exposed to Java!
4. Introduction to the wireless marketplace
4.1 Wireless services
Wireless information devices are characterized by timeliness and mobility, features that open up opportunities for many new and exciting
services. Key areas to develop services in are location-based services and games. In Chapter 12 we see an example of a location-based
application demonstrated by the Telenor’s "Travel Assistant," case-study, while a case-study from Symbian Competence Center, Digia Oy,
gives an example of a location-independent service. Other development areas for new services are described below and we include an
in-depth look at wireless games, demonstrated in the Whist case-study in Chapter 6. These new markets will allow networks to deliver value
added services to customers, assisting them in their quest to reduce customer churn rates while increasing ARPU (average revenue per user).
Wireless commerce
This provides the opportunity to purchase goods or services securely and easily, using a mobile phone. Examples include hard goods such as
the weekly shopping, soft goods that can be instantly downloaded such as stock information or a piece of music, or services such as
banking: the ability to transfer money between accounts, control standing orders, or transfer money to someone else's account.
Cashless payment
This enables you to make small purchases without having to count the change, for example newspapers, car parking, road tolls.
Mobile and paperless ticketing
The airlines are moving toward paperless ticketing. A ticket confirms that the holder has paid for a service, such as a train journey or an
airline flight, or a concert performance or a film, but it doesn't have to be a piece of paper. It will be possible to buy tickets directly using
your wireless phone. The ticket will be held in a secure format on the phone and then checked and cancelled as you enter the cinema or
theatre, or board the plane or train.
Travel and traffic congestion information
How often have you been on a car journey and suddenly hit the back of a queue? Yet a few hundred meters down the road was a turn-off
that might have provided an alternative route. We need traffic and congestion information to be pushed onto our phones in a timely manner
so that we can plan our journeys better and avoid delays.
Rail and flight information
We need information on flight and train times, changes to these times, and additional information such as delays, gate and platform numbers.
Location-based services
Location-based services can be divided into two types: "coordinate" services that provide positional information (using GPRS or signal
strength), and push services that vary depending on your location. (See Chapter 12).
"Coordinate services" answer questions like "where am I?", " where is…?", "how do I get there?". If you are walking through Florence, the
answer to "where am I?" might be Giotto's bell tower and your destination could be the Palazzo Pitti. And of course we can also answer
"where are my friends?".
Push-type location services will enable you to receive information about local items that are of interest to you, such as restaurants, museums,
and shops.
Networks will also be seeking ways to continue engaging their customers when they’ve enabled them to get to (or on their way to) their
destinations – and one way to do that will be by offering games. Wireless games contrast with location-based services, drawing players
together on the network and making their location irrelevant. Of course, wireless games could – and do - also use location as a feature and
we will see games being developed that rely on location as part of their intrinsic offering. This book includes an in-depth case-study of a
wireless card game, Whist, developed by Symbian for the Quartz reference design. We look in more detail at the wireless games market
below and why it is so important. Many of the paradigms that apply to games also apply to other applications and services on wireless
platforms.
4.2 Understanding wireless games
To understand the importance of Java for wireless games, we need to look at the wider context of developing applications for the wireless
market. Let’s begin by looking at some numbers. In a report published in September 2000, Datamonitor published forecasts of the wireless
games market across Western Europe and the USA. By 2005 they predict this market will comprise 200 million people, all playing Internet
games on their mobile phones. Western Europe and Japan will be at the center of this revolution. Take-up in the USA will be delayed,
mostly because of the speed of network rollout and the lack of common standards in the US. The market is expected to be turning over a
staggering US$6 billion by 2005, although revenues are not expected to pick up until 2003. For developers, Europe’s primary markets will
be in the UK and Germany. (Datamonitor: The future of wireless gaming, Sept 2000, www.datamonitor.com)
The new world of wireless games
The popularity of simple games like Snake and Tetris on mobile phones shows that most of us, whether we care to admit it or not, like to
play games. Games, however, can become much more sophisticated. Much of the gaming AI (artificial intelligence) can be provided by the
server, or the server can be used find us a partner of the appropriate level for Dungeons and Dragons, or chess. Such server-mediated
games provide opportunities for chargeable services.
The games industry is full of heavy hitters. While Sega’s Megadrive drew a (large) cult following, it was that consummate mass-marketer,
Sony, that established the games console as a fixture in many living rooms. In the home there are now some very powerful games platforms.
But now games are extending their reach out of our homes and into our hands. The wireless market space differs from the traditional
console-driven market, defined by some analysts as the domain of "casual gamers," as opposed to the "hard core" of console-users. There’s
little precedent, though, and Nintendo has the only successful platform so far with the Gameboy. But the "casual vs. hard core" gamer
argument may help to explain the way games should and will be targeted in a new, networked, market.
With the wireless games market still in its infancy, there is a buzz of activity from telecoms OEMs, and network operators, as well as those
companies that have traditionally built games consoles and published games, to build market share in the wireless space. The ways in which
they are doing this are manifold. Nokia is developing its own games and announced some time ago that it intended to provide content, but
has also signed agreements with software houses Rage and Eidos for third-party development. Others, such as Motorola, are encouraging
and supporting independent developers to build applications for their next generation platforms (see table below). Content-providers like
AOL are also looking for ways to expand their offerings in this area. For companies like Sony, wireless is an opportunity to extend games
from the console to the hand. Sony’s alliance with Vodafone (which has UK and Germany as prime territories), and development work with
leading handset manufacturer Nokia, underlines its intentions. But the race is far from won; in fact, it has only just begun.
Write or port?
Should you write or port applications? In the short run, many of the games appearing on WIDs will be ported from other platforms – in fact
this is expected to be an early enabler of the WID market, according to analysts like Datamonitor: "Gradually, popular PC and console
games will be ported onto mobile phones. With their design altered to accommodate a smaller screen, they will appeal to the public." Classic
games such as cards are expected to be very popular, too. However, porting games and any other application poses a set of problems in
such areas as user interaction and user interface, so that the better approach and long-term route to a successful games market will be
through designing original content and applications. Network operators are now looking for innovative ways to differentiate their brand in a
competitive market by taking full advantage of a network’s functionality.
Device or platform?
With games moving onto wireless platforms, we can introduce the concept of pervasive games. With pervasive games, an application that is
running on a tablet Communicator could also be required to run on a Smartphone, or even a desktop. This will not only require developing
several versions of the game at UI level to take into account any differences in the form factor, but might have implications for the kind of
interactions that take place between each form factor and the network. Java offers games developers the best tools to achieve this with the
minimum of difficulty (Chapter 11).

Figure 6. The games market is altogether more complex now than it used to be and has grown to include WIDs and many other
new form factors as well as new developers and publishers.
Business case
Who should you target your game at – operator, handset manufacturer or user? Where does it sit in the mobile space? Should you sell your
program over the air or over the counter? It is possible that games could be sold over the counter direct to users, with no network
functionality required, but a key driver for selling applications to network operators is that the application must use airtime. This is a crucial
consideration. It is a goal of infrastructure vendors to build up the market by helping operators maximize profit from their hardware. Most of
Symbian’s licensees now run developer forums designed to support independent developers and bring their applications to market. Below is
a list of some of the developer links Symbian partners and licensees provide.
WIDs offer a far richer array of enabling technologies than today's simple feature phones. This allows users to make the most of those little
bits of "niche time", perhaps while they are waiting for a train or in a queue. We can catch up on our messages, continue working on our
holiday plans, pay the newspaper bill, or we can have a bit of fun.
5. The future of Java on Symbian OS
This chapter demonstrates the importance of Java to Symbian and the wireless market in general. Symbian will continue to establish Java as
the preferred developer language for its devices. Java is already a permanent part of the Symbian OS and the intention is that every Symbian
WID will include a JVM.
Symbian's goal is to provide the best possible Java platform on WIDs and Symbian actively encourages the general software houses to
adopt Java. However, C++ will continue to play a significant role. It will continue to be used by specialist EPOC developers for areas such
as application engines and device drivers. Java and C++ developers will be catered for on an equal footing with the same level of support,
quality of tools, and visibility.