Hi all
I am developing sms based application i try to delete sent items i got code from wiki http://wiki.forum.nokia.com/index.php/SMS_Operations
i want to delete sent messages only send from my application? problem is when i compose a message from default Messaging app this code delete that mesasges also.
Code:case EMsvEntriesMoved: { // Entry id is obtained from the session event arguments. TMsvId* entryId = STATIC_CAST( TMsvId*, aArg2 ); // We are interested in messages that are moved to Sent Item Folder if ( *entryId == KMsvSentEntryId ) { TMsvSelectionOrdering sort; sort.SetSorting(EMsvSortByDateReverse); sort.SetShowInvisibleEntries(ETrue); // we want to handle also the invisible entries CMsvEntry* parentEntry = CMsvEntry::NewL(*iSession, KMsvSentEntryId, sort); CleanupStack::PushL(parentEntry); CMsvEntrySelection* entries = parentEntry->ChildrenL(); CleanupStack::PushL(entries); for(TInt i = 0; i < entries->Count(); i++) { if( parentEntry->ChildDataL(entries->At(i)).iMtmData3 != KUidMsgTypeSMS.iUid ) { parentEntry->DeleteL(entries->At(i)); break; } } CleanupStack::PopAndDestroy( entries ); CleanupStack::PopAndDestroy( parentEntry ); } break; } }
Regards
jey_




