S60 3rd Edition SDK for Symbian OS Example Applications Guide |
Messaging Example
1. About this Example
2. Prerequisites
3. Design and Implementation
4. Class Hierarchy
This tutorial demonstrates the use of SendUI API for creating SMS, MMS and email messages. The CSendUi class creates the proper editors and enables messaging functionality in your own application.
The tutorial starts by listing the pre-requisites the user should know before starting this example, and describes how to build and run the example.
This example exists as a complete application, and has the standard Symbian OS application architecture employing the Application, Document, UI, and View classes. The example makes use of other Symbian OS concepts which the reader should be aware of before attempting to understand this example. These are:
- the idea of the SendUI API
This application supports changing the screen size when program is running. The messaging settings for SMS, MMS and email should have been configured properly before using Messaging example application.
The program capabilities are defined in Messaging.mmp file: CAPABILITY NetworkServices ReadUserData WriteUserData.
The program takes screen parameters in the start of the application and works with all screen modes. The program supports changing the screen layout while the program is running.
This example can be built in directory Messaging\group by running the following commands:
bldmake bldfiles
abld build winscw udeb
It is possible to create project for CodeWarrior IDE by running the following command:
abld makefile cw_ide
In addition it is possible to create project form CodeWarrior IDE:
Open CodeWarrior IDE
Select File -> Import from .mmp file
Browse to chat/group folder and select messaging.mmp
Select Project -> Make
Select Project -> Run
After successful build, application can be found and started from: Applications > Installed > Messaging
Messaging application example uses SendUI API to launch the message editor and provide messaging functionality. The example is quite simple, because all functionality except handling the Options menu items is provided by SendUI API.
The main point of this program is to demonstrate the easy use of existing messaging functionality through a public API.
The SendUI API is used through CSendUI class which is instantiated in the ConstructL method of CMessagingAppUi class. CSendUi object is deleted in the destructor of CMessagingAppUi. The SMS, MMS and email editors are launched in CMessagingAppUi::CreateAndSendMessageL method which takes as its parameter the type of editor expected to be launched.
The CMessagingAppUi::HandleCommandL() method calls the wanted handler methods depending the aCommand parameter. Selecting "Create SMS", "Create MMS" or "Create email" options will call the CreateAndSendMessageL method with a parameter defining the wanted message type. It would be easy to add more create message options in similiar way to any other message types available.
This inheritance list is sorted roughly, but not completely, alphabetically:
|
© Nokia 2006 |

|