I am trying to send an sms immediately after construction from a 7650 device, but it won't work.
I am using the CSendAs class to create a message in the outbox. This sort of works, at least it is visible in the 7650's messaging application, with seemingly correct details.
Then, inspired by the GDSMS example, I try to issue an asynchronous call to schedule the message and pass the request status member of a CMsvOperationWait as argument.
What happens is that I get a panic/error message popup saying something like "Message could not be sent" as well as a "System error" message.
So, is it a correct approach to use the above scheme for immediate sending ?
I have not found documentation on the CMsvOperationWait, is it a beta-glitch or is it deprecated and unsupported ?
Am I missing something in the creation of the message which makes it unsendable ?
Is there any documentation other than the API reference that I should read to understand this better ?
// Set body of message
User::LeaveIfError( r = sendAs->ValidateMessage());
// Save message to message server, and make it visible in outbox
sendAs->SaveMessageL( ETrue );
// Schedule to send now.
// Use MTM from sendAs
CBaseMtm* SmsMtm = &(sendAs->ClientMtm());
entry.SetOffPeak(EFalse); // What does this do ?
entry.SetSendingState(KMsvSendStateWaiting); // Is this necessary ?
CMsvEntrySelection* sel = new(ELeave) CMsvEntrySelection;
here is a summary of how I solved my problem of SENDING an sms immediately from a 7650 w/ firmware 3.12 using v 0.9 of the SDK.
I ported the vital functionality of the GDSMS example to work on Series60, as I did not succeed in using CSendAs. Scheduling did not work with CSendAs, so I use the CSmsClientMtm directly as in the example. Problem is though that some include files are missing. This is remedied by doing the following:
1. Get the header "etelbgsm.h" from the Nokia 9200 SDK
2. Next problem is a file "etelgprs.h", I have not found this one and do not need GPRS so I edit the headers "smutset.h" and "smutset.inl" to exclude all references to GPRS (just a few). This may be inspired by doing a diff with the same files of the Nokia 9200 SDK.
Tip: Not caring much for GUI stuff at the moment, I simplified the work by adapting the recently published MMS Example to SMS as above instead of porting the whole GDSMS including GUI functionality. Which I suspect includes a lot of missing headers as well.
RE: Sending SMS immediately from Series60 device
Well, now I have put the code and a SIS file here:
Nokia Staff: The code above is an adaptation of Nokia software, please tell me if you think it is inappropriate to publish the code on the web, and then I'll remove it. However, I think maybe some developers may find it useful.