I am struggling on capture the delivery reports on the phone from my code. What I want to do in my program is : generate a SMS, sent it out from the phone and then capture the delivery report and store it in the database.
After 2 days struggling, I really doubt if there is a way to capture delivery report by listening on TMsvSessionEvent. I searched the whole forum and saw some discussions about this topic before. But there is never a clear answer.
I use Yucaa's example program which is said to be able to capture delivery report, but it didn't. I post part of the code here. If anyone is interesting, I can post more.
I notice that in E52, when a SMS is generated and moved to Sent Folder, a delivery report record will be generated under Delivery Folder. The status is "pending". After the real delivery report is received by the phone from SMSC, the status of that delivery report record on the phone will be updated, as well as timestamp. The behavior of Nokia is quite funny cause I never see such things on andorid phones.
When delivery report arrives on my phone, I am able to capture the below changes by listening on incoming SMS event. A record is created and modified and then deleted from the inbox. I assume this is the delivery record. But I am not able to see any detailed information of this record.
Event: Entries Created Inbox entries = 1 SwitchCurrentEntryL error = -1;
Event: Entries Changed Inbox entries = 1 GetEntryL error = -1;
Event: Entries Deleted Inbox entries = 1 GetEntryL error = -1;
I hope some experts can shed me some lights here. Please don't reply to me to see any SMSReceiver examples on WIKI. I am very clear how to listen on incoming SMS and how the SMS flow works.
void CSMSEnigne::HandleSessionEventL(TMsvSessionEvent aEvent, TAny *aArg1, TAny *aArg2, TAny *aArg3)
if(aEvent == EMsvServerReady
iClientMtmReg = CClientMtmRegistry::NewL(*iMsvSession);
SMSTrace.Append(_L8("Event: Entries Created"));
SMSTrace.Append(_L8("Event: Entries Changed"));
SMSTrace.Append(_L8("Event: Entries Deleted"));
SMSTrace.Append(_L8("Event: Entries Moved"));
SMSTrace.Append(_L8("Event: Mtm Group Installed"));
SMSTrace.Append(_L8("Event: Mtm Group DeInstalled"));