|
|
Classification: |
C++ |
Category: |
Messaging |
Created: |
05/20/2003 |
Modified: |
03/19/2004 |
Number: |
FAQ-0876 |
Platform: |
Symbian OS v6.0, Symbian OS v6.1, Symbian OS v7.0, Symbian OS v7.0s |
|
Question: I have an application which communicates with another application over SMS. Such a scheme can be implemented as a BIO messaging
plug-in. However, to launch a BIO message and release the payload to my application requires the user to open and accept the
message. This presents a poor user experience. How do I receive SMS data seemlessly without the need for the user to open and accept the message?
Answer: It is possible to hook into the communications stacks such that you can "suck out" a received SMS underneath the layers which
inform the user or indeed interact with the messaging architecture. Essentially, you can attach to the SMS protocol stack
at the same level as the NBS layer (Narrow Band Sockets) and have messages conforming to a pattern (i.e. first few bits of
text "//mymessagetype") directed to your code. This does of course mean you have to be in control of the format of the received
SMS. The book Symbian OS C++ for Mobile Phones (http://www.symbian.com/books/scmp/scmp-info.html) provides a good example of how to do this for a peer-to-peer battleships game, with the "moves" being transmitted seemlessly
over SMS. Chapter 20 ("GDP Implementations") does exactly this.
You can also download a reusable library (with source code) which provides essentially the same functionality in a convenient C++ API targeted at Symbian OS v7.0.
|
|
|