首 页 | 新 闻 | Symbian | Android| Windows Mobile | J2ME | 下载中心 | 游戏策划招聘与求职 | 购书指南 | 视频教程
您现在的位置: 开发视界 >> Symbian英文资料 >> Network >> 正文
Programatically sending an SMS Message
作者:佚名    文章来源:转载    更新时间:2007-3-6 23:26:11

The RSendAsMessage has been introduced in Symbian v9 and greatly simplifies the sending of a short messages (SMS) in C++.

// Link against sendas2.lib
#include <rsendas.h>
#include <rsendasmessage.h>

...

 // Open a connection with the SendAs server
 RSendAs saSrv;
 saSrv.Connect();
 CleanupClosePushL(saSrv);
       
// Create your message
RSendAsMessage msg;
msg.CreateL(saSrv, KSenduiMtmSmsUid);
CleanupClosePushL(message);
msg.AddRecipientL(aRecipientNumber,RSendAsMessage::ESendAsRecipientTo);       
msg.SetBodyTextL(aMessageText);
 
// Send the message
message.SendMessageAndCloseL();
       
// Cleanup
CleanupStack::Pop(&message);
CleanupStack::PopAndDestroy(&saSrv);

相关文章:
Sending a message from Symbian C++ to a J2ME MIDlet.
Mission Impossible : Getting the Location string.
Sending a message from Symbian C++ to a J2ME MIDlet.
Mission Impossible : Getting the Location string.
 

站点地图 | 加入收藏 | 联系站长 | 广告服务 |
QQ:280529124  Tel:0592-8271361 辽ICP备05021703号