Qt Send SMS saves message in drafts
-
Hello
Im using the following code to send SMS
@QMessageAddress addr;
QMessage message;
QString to;
bool result;
to = aContact.detail(QContactPhoneNumber:efinitionName).value(QContactPhoneNumber::FieldNumber);
addr.setType(QMessageAddress::Phone);
addr.setAddressee(to);
message.setBody(GetMessageText());
message.setTo(addr);
message.setType(QMessage::Sms);
result = iSystemMessageManager.send(message);@iSystemMessageManager is an object of QMessageService.
However on deployin the code on the phone, the message is stored in drafts folder and doesnt go out. What may be wrong
Thanks
Edit: fixed title to something readable
-
What kind of phone are you using?
Could you please set a proper title for your post?
-
Sorry abt the title. Corrected.
Am using Nokia X6
-
Hi,
Have you tried the following example at Forum Nokia: "How to send and receive messages in Qt for Symbian":http://wiki.forum.nokia.com/index.php/How_to_send_and_receive_messages_in_Qt_for_Symbian ?
The other option is to use "Symbian C++ code just to send SMS":http://wiki.forum.nokia.com/index.php/CS001307_-_Symbian_C++:_Sending_an_SMS
Best regards,
LeonP.S.
Please note that both examples require NetworkServices capability! -
Thanks.
I was missing NetworkServices capability. works now :)I have another doubt though.
How can i send multiple sms;s at once.I understand single object of QMessageService can send only 1 sms at a time.
Im usingiSystemMessageManager[i].send(message)
where iSystemMessageManager is QMessageService object.
But no luck. -
[quote author="yannifan" date="1303028540"]Thanks.
I have another doubt though.
How can i send multiple sms;s at once.
[/quote]Hi,
Although I have not tested it myself. In my opinion you should be able to send sequence of SMS one after another. Have tried to create a method for sending and the call it multiple times with different arguments?
Regards,
Leon