📄 release_notes.txt
字号:
S60 Platform: SMS Example v2.0
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
This C++ example demonstrates programmatical handling of SMS messages. Messages
can be sent from the application and they can be received directly into the
application (that is, catching incoming messages before the user gets any notification).
In addition, messages can be deleted, copied, or moved to other folders of the
message store (inbox, outbox, drafts).
Note that there are major changes between S60 2nd and 3rd Edition.
Currently SMS sending is implemented in a different way in S60 3rd Edition
because the old way does not work if there are not enough cababilities.
--------------------------------------------------------------------------------
PREREQUISITES
- Active objects
- Symbian OS key concepts
- Messaging key concepts
--------------------------------------------------------------------------------
IMPORTANT CLASSES
CSMSExampleEngine | Main engine class
CSMSExampleMtmsEngine | SMS handling { deleting / copying / moving / sending/ msg bodys / msg address }.
CLogView | Visualizes what has happened.
CListboxView | Manages Listbox command handling and performs operations on selected messages.
CMarkableListContainer | SMS message container. Selects groups of messages.
CSMSExampleParser | Searches for a number which has exactly 10 digits from the SMS message body.
CSMSExampleAppUi | Manages command handling and captures (automatically) received messages. Also performs automatic deletion of the received messages if the feature is enabled.
--------------------------------------------------------------------------------
KNOWN ISSUES
- The example should be tested in a real device instead of the emulator.
- smutset.h and smuthdr.h are missing from the S60 2nd Edition SDK.
- etelgprs.h / etelbgsm.h are missing from the S60 1.2 SDK. Thus, when building for S60 1st Edition, Feature Pack 1 (1.2),
you need to change the header files smutset.h, smsuaddr.h, and gsmumsg.h as follows:
File Replace With
**************************************************************************************************
smutset.h #include <etelgprs.h> class RGprs { public: enum TSmsBearer{}; };
smsuaddr.h #if !defined(__ETELBGSM_H__) const TUint KGsmMaxTelNumberSize = 100;
#include <etelbgsm.h>
#endif
gsmumsg.h #if !defined (__ETELBGSM_H__) class RSmsStorage
#include <etelbgsm.h> {
#endif public:
enum TStatus{};
};
**************************************************************************************************
RUNNING THE EXAMPLE
Log view:
The default view is the log. The log collects all events and displays information
about every event that has happened. The log tells, for example, when a new message has arrived and
displays its body text/address. Please be patient if your folders are large; listing operations
may take several seconds. Note that the messages moved or copied from inbox cannot be edited
because the messages have their complete flag on.
The commands in the Options menu are as follows:
1. "Send SMS".
1.1 "Address query". Enter SMS recipient. For example "050 123 4567".
1.1.1 "SMS body text". Write SMS body text. Max 160 characters.
2. "Move message".
2.1 "From drafts". Select source folder.
2.1.1 "To inbox". Select target folder. -> 6. Listbox Operation Move from drafts to inbox.
2.1.2 "To outbox". Select target folder. -> 6. Listbox Operation Move from drafts to outbox.
2.2 "From outbox". Select source folder.
2.2.1 "To inbox". Select target folder. -> 6. Listbox Operation Move from outbox to inbox.
2.2.2 "To drafts". Select target folder. -> 6. Listbox Operation Move from outbox to drafts.
2.3 "From inbox". Select source folder.
2.3.1 "To outbox". Select target folder. -> 6. Listbox Operation Move from inbox to outbox.
2.3.2 "To drafts". Select target folder. -> 6. Listbox Operation Move from inbox to drafts.
3. "Copy message".
Same as 2.1 but the operation is Copy.
4. "Delete message".
4.1 From drafts -> 6. Listbox Operation Delete from drafts
4.2 From outbox -> 6. Listbox Operation Delete from outbox
4.3 From inbox -> 6. Listbox Operation Delete from inbox
5. "Settings"
5.1 "Automatic delete on". Set this option if you want to delete received SMS messages automatically.
NOTE! This feature will delete every SMS message that has arrived while it is on. Be careful with it although
it shows the message address/content before deletion. There is a slight delay between message
arrival and message automatic deletion because ncnlist panics if there is no time to play the
"message has arrived" tone.
5.2 "Automatic delete off". Set this option if you do not want to delete received SMS messages automatically (Default).
Listbox view:
Choose a group of messages for which to perform an operation. The commands in the Options menu are as follows:
6. "Select all". Select all SMS messages of the chosen source folder.
7. "Deselect all". Deselect all SMS messages.
8. "Done". Execute an operation for selected messages. (See 2. / 3. / 4. ). The Log is notified of the executed operation.
Use the navigation key to select or deselect a message.
9. "Back". Return to the log view and do nothing.
--------------------------------------------------------------------------------
BUILD & INSTALLATION INSTRUCTIONS
MOBILE PHONE
------------
At first make sure that the paths in pkg files are correct for your SDK.
- S60 3rd Edition
open command prompt and go to /SMSExample/group
bldmake bldfiles
abld build gcce urel
go to /SMSExample/sis
Edit the Series60_smsexample.pkg's paths to match those on your system.
makesis Series60_smsexample.pkg
Sign the SIS package
- See the SDK Help for information about self-signed .sis packages
(createsis in "How to sign .sis" document)
or visit www.symbiansigned.com for information about developer certificates.
Install the signed .sis file to a S60 3rd Edition device.
- S60 1st and 2nd Edition
open command prompt and go to /SMSExample/group
bldmake bldfiles
abld build armi urel
go to /SMSExample/sis
for S60 2nd Edition:
Edit Series60_v21_smsexample.pkg so the paths match.
makesis Series60_v21_smsexample.pkg (if SDK 2.x)
for S60 1st Edition:
Edit Series60_v12_smsexample.pkg so the paths match.
makesis Series60_v12_smsexample.pkg (if SDK 1.x)
Install the SIS file to the device.
If you have problems in building, see the Known issues section for required changes to your SDK.
You can, of course, use a developer certificate for signing.
EMULATOR
--------
go to /SMSExample/group
bldmake bldfiles
abld build wins udeb //or abld build winscw udeb
start the emulator
Note: The emulator observes the Drafts folder instead of the Inbox. Thus it is possible to see what
the example does without real SMS support from the emulator.
--------------------------------------------------------------------------------
IMPROVEMENT IDEAS
CListboxView:
* Get rid of the reference to the engine and implement in MVC style.
CSmsEngine:
* Function GetMessageIds requires that GetFolderSMSMessageInformationL has been called first.
* See comments in HandleSessionEventL for more improvement ideas.
(There are some ready-made code skeletons for improvements)
--------------------------------------------------------------------------------
COMPATIBILITY
S60 3rd Edition
S60 2nd Edition
S60 1st Edition
TESTED WITH Nokia 3650, Nokia 6600, Nokia 6630, Nokia N90, and Nokia E60
Created / tested with Series 60 SDK 1.2, for Symbian OS, supporting Metrowerks Codewarrior, for Symbian OS
and with Series 60 2nd Edition SDK for Symbian OS, Supporting Feature Pack 2, for C++, Supporting CodeWarrior
and with S60 3rd Edition SDK for Symbian OS, for C++
--------------------------------------------------------------------------------
VERSION HISTORY
2.0 Ported to S60 3rd Edition. Split the engine and GUI.
Changes in SMS sending, see CSmsEngine::SendSmsL.
Now RSendAs is used to demonstrate its usage. In MTM sending
InvokeAsyncFunctionL(ESmsMtmCommandScheduleCopy,...) had to be changed to
CMsvEntry::CopyL in order for it to work.
Icons are set up differently in S60 3rd Edition, see
CMarkableListContainer::SetupListIconsL
1.0 First release.
--------------------------------------------------------------------------------
EVALUATE THIS RESOURCE
Please spare a moment to help us improve documentation quality and recognize the examples you find most valuable, by rating this resource
at http://www.forum.nokia.com/main/1%2C%2C90%2C00.html?surveyId=5f17ccde-249e-4c7d-ace9-980095ea5db1/S60_Platform_SMS_Example_v2_0_en.zip.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -