Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Custom bio-messaging example for Symbian
Bio-messages are "internal" messages intended for device or app configuration rather than as information messages for the user. This code example shows how to create and handle custom bio messages.
The BIO Messaging component provides a means of handling incoming messages that are intended for processing by the device as opposed to being displayed to a user.
Examples of these types of messages include:
- Internet Access configuration: automatic updates of Internet settings
- email settings: update or creation of email accounts
- vCards: electronic business cards
- vCals: electronic calendar entries.
BIO stands for Bearer-Independent Object: this is a reminder that the handling of such a message does not depend on the type of transport (e.g. SMS or email) over which it was received.
How it works
The BIO Messaging component can be split into two parts: the BIO framework and the BIO parsers. BIO parsers provide functionality to parse and process particular types of message. It is possible to add new BIO parsers to provide support for different types of BIO message. All parsers derive from a base class CBaseScriptParser.
The framework manages a database of BIO message information that can be used to determine the type of the incoming message. A component called the BIO watcher is responsible for watching for new messages that fit one of these types.
Once a BIO message has been received, the BIO MTM is invoked to parse and process it. The BIO MTM routes the message data to the appropriate BIO parser.
The parse and process operations may perform different functions depending on the type of message. Sometimes the message payload may be saved as a file for some other component to process; sometimes the data is processed immediately.
File:BioSMS wiki.zip shows one way on defining custom bio SMS massages and handling them.
This example is split in four parts: Bio parser, Bio control, Received SMS handling application and bio SMS sending application.
The Bio parser & Bio controls are run once message is clicked by user, with this example any new messages are simply marked read which after the Received SMS handling application is run, and the message ID is sent to it for further processing.
The bio control part would usually be used for viewing messages, with this example the SMS viewing is always handled by the Received SMS handling application, thus whenever bio control is opened, it will run the handling application and exit.
To make this application useful, you would could change the actual data included in the SMS message as well as the Bio identifier UID, and add actual message handlings to the Received SMS handling application.