Review
Review
Product Description
Programming Symbian OS is a key skill for mass market phone application development. Whether you are developing applications and services for shipping mobile phones, or involved in pre–market mobile phone development, this book will help you understand the fundamental theory behind developing Symbian OS C++ code for constrained devices.
- A collaborative book, incorporating the expertise of over 30 Symbian engineers
- Comprehensive coverage of Symbian OS suitable for programming Nokia and Sony Ericsson systems and any Symbian OS v7.0 based smartphone
- Also provides supporting material for Symbian OS v6.0 and v6.0 phones
- Accompanying CD includes demo version of Metrowerks toolchain for the P800
From the Back Cover
This book provides you with the ultimate developer guide to Symbian OS C++ programming. The elegant, powerful architecture of Symbian OS is optimized for the mobile environment and for the demands of advanced communication on mobile networks. Whether you are developing applications and services for shipping mobile phones, or involved in pre–market mobile phone development, this book will help you understand the fundamental theory behind developing Symbian OS C++ code for constrained devices.
CD–ROM Includes:
- demo version of Metroworks tools for Symbian OS
- UIQ Software Development Kit (SDK)
- compilers and documentation
Symbian OS is the advanced, customizable operating system licensed by the world’s leading mobile phone manufacturers. It is designed for the specific requirements of advanced 2G, 2.5G and 3G mobile phones and includes a robust multitasking kernel, integrated telephony support, communications protocols, data management, advanced graphics support, a low level graphical user interface framework and a variety of application engines.
Visit the associated websites at:
www.symbian.com/books
www.wileyeurope.com
About the Author
Excerpted from Symbian OS C++ for Mobile Phones by Richard Harrison. Copyright © 2003. Reprinted by permission. All rights reserved.
It seems to be traditional to start a book on computer programming with a Hello World example and, although this is a book that is more about an operating system (OS) than a programming language, Ill follow that tradition. In the process Ill introduce you to the emulator, and to the tools for building C++ programs, so that by the end of the chapter you will have found out the basic information on how to build and run a Symbian OS application. I wont get too involved in describing Symbian OS programming conventions, application programming interface (API) functions, and so forth. Instead, Ill concentrate on the tools you need, and how to use them, leaving the more specific details until later chapters. First, Ill briefly describe the emulator. Most Symbian OS software is developed first on the emulator and only then on real target hardware. The emulator also includes a number of Symbian OS applications, and so mimics a real Symbian OS phone very closely. You will need to get familiar with the emulator and, while doing so, we can use the opportunity to take a look at the applications and some of the distinctive features of UIQ, one of the various graphical user interfaces (GUIs) used by Symbian OS.
Then well create a program. The easiest things to build are textmode console programs, so thats the form of the classic Hello World application that well use. Ill demonstrate how to compile it for either the emulator or a target Symbian OS mobile phone, and how to launch and debug it using the Metrowerks CodeWarrior IDE.
Using the Emulator
The emulator is a fundamental tool for all the Symbian OS SDKs, so its vital that you get to know it and learn how to use it. Symbian OS C++ for Mobile Phones. Edited by Richard Harrison ÆÉ 2003 John Wiley & Sons, Ltd ISBN: 0-470-85611-4
2 GETTING STARTED
If youve never seen Symbian OS before, the emulator offers an opportunity to get to know some Symbian OS basics from a users perspective, so well look at these straight away. Later, youll want to look at the Emulator Reference in the appendix to learn enough about how the emulator works so that you can begin to make effective use of it as a developer.
If youre used to Symbian OS, then you may want to skip the next section and go straight to Hello World Text Version and start building an application.
1.1.1 Launching the Emulator
Once youve installed the Symbian OS UIQ C++ SDK, you can launch the emulator in either of the following ways:
- From Windows Explorer: find directory \epoc32\release\winscw\ udeb\ and launch epoc.exe
- From the command line: put \epoc32\release\winscw\udeb\ into your path, prefixed by the correct drive letter, launch a prompt, and just type epoc
Alternative initialization of the emulator is described in Appendix 4. However, you choose to start it, the first thing youll see in the UIQ emulator is the application launcher.
As its name suggests, the application launcher that you see in Figure 1.1 enables you to launch applications. Its menus allow you to view or change system settings, and it also has a control panel. Its very easy for end users to get to know the application launcher: you dont really need a manual. Just tap here and there, and youll soon find out what it has to offer.
1.1.2 GUI Style
As you browse around the application launcher on the emulator, youll begin to see how UIQ, as a particular example of the range of GUIs available for Symbian OS, is optimized for the pen-based mobile phone form factor.
UIQ is designed as a read mostly user interface, to be used mainly for browsing and for making a selection from a range of options with a single tap of a pen. Other GUIs such as the Series 60 interface used, for example, on the Nokia 7650 are optimized for the different hardware resources of the devices on which they are intended to run. Although the different GUIs may have a superficially different appearance, they all rely on a common set of underlying features, some of which are briefly described below.
USING THE EMULATOR 3
On the emulator, you click with a mouse, but on a real Symbian OS phone you would tap with a pen. For reasons we'll discuss later, the difference is important, so I'II always say, 'tap', just to remind you. Figure 1.1
Screen layout
The UIQ screen layout, illustrated in Figure 1.2, includes the following areas (from top to bottom of the screen):
The application picker contains icons that allow you to switch applications. Tapping on any icon brings the application it represents to the foreground. The application launcher icon, at the far right, brings the application launcher to the foreground, allowing you to launch applications that are not displayed on the application picker. If you wish, you can customize the application picker to launch your own preferred set of applications.
4 GETTING STARTED
Figure 1.2
The menu bar contains one or more menus, whose names and the selection of items that each menu contains change from application to application, and also as you change view within a particular application. In UIQ, the menu bar usually contains two menus on the left and may optionally have a folder menu on the right.
The application space is the central area of the screen, where an applications view is displayed. Applications use this area in whichever way is appropriate to the information that they display.