Using SMS "folders" from Code.
| Wed, 2005-05-11 17:23 | |
|
Hi all, My purpose is to (among others) 1, create a new SMS folder from code 2, be able to move SMS messages from the Inbox to some other SMS folder. I am still scratching the surface of Symbian and my application is currently able to receive SMS messages in the HandleSessionEventL callback of a MMsvSessionObserver. I now have the CSmsClientMtm with the SMS and now i wonder what's next. i guess moving to another folder is not hard, but creating a folder beats me.i try to create a new folder this way, but no folder appears at all on the device/emulator. Code: ... iReceiveSession = CMsvSession::OpenSyncL(*this); ... //get to messaging root, if currently at message level CMsvEntry* iMsvEntry = iReceiveSession->GetEntryL(entry.Parent()); //inbox folder iMsvEntry = iReceiveSession->GetEntryL(iMsvEntry->Entry().Parent()); //the messaging root TTime date; date.HomeTime(); _LIT(teststr,"testfolder"); TMsvEntry* folderentry = new (ELeave) TMsvEntry(); folderentry->iType = KUidMsvFolderEntry; //i want a folder folderentry->iMtm = KUidMsvLocalServiceMtm; //..a local folder folderentry->iDetails.Set(teststr); folderentry->iDescription.Set(teststr); folderentry->iServiceId = smsMtm->ServiceId(); folderentry->iSize = sizeof(folderentry); folderentry->iDate= date; folderentry->SetStandardFolder(ETrue); folderentry->SetVisible(ETrue); iMsvEntry->CreateL(*folderentry); Any help is greatly appreciated (i may even send you a nice postcard from where i live ), simon b - - - - - - - |
|






i guess moving to another folder is not hard, but creating a folder beats me.
Forum posts: 9
ok so this issue is closed, bye folks.
- - - - - - -
simon b
Forum posts: 45
Iam working on a application which needs to listen for incoming SMS. can u please help me to do this, how do i test it in emualtor.
Forum posts: 9
As for testing, well just work with the drafts folder on the emulator and the real inbox on the device (a matter of an #ifdef), that is, you can feed your app with draft messages for testing.
- - - - - - -
simon b
Forum posts: 6
Forum posts: 1
Can you send me the link to some examples of how set up a sms receiver/sender?
I'll tried the nokia eample, but it doesn't run on nokia 6600 'cause it's not a 'feature pack 3' of the second edition...
I need something that receive sms and parse them..
I hope in you.. please help me!
Forum posts: 18
Forum posts: 9
I still did not get a workaround for the caching issue, i guess it is something more involved than i have the time for.
- - - - - - -
simon b
Forum posts: 18
And what do you mean by local folders? Are those the one under the 'C:\System\Mail\' Folder or the one that appears when you open the messaging App? I'm using n3660, is that why it's not working?
Forum posts: 9
make sure to set the type to KUidMsgTypeSMS rather than KUidMsvLocalServiceMtm otherwise there gonna be problems erasing the folders. (Apparently a bug, you can create entries in the MTM tree with MTM id KUidMsvLocalServiceMtm but you can't delete them.. ) i had to delete the messaging index file on the device to let these folders disappear.
Local folders >> on my p910 i have a dropdown that lets me choose from "inbox, sent messages, drafts, outbox" and then below these is a marker "local folders" and these folders created from code appear below the marker line. They go under
C:\System\Mail\ like anything else, sure.
As for folders showing up, do you see them appear instantly after the code runs? Like i said i had a hard time with this but could not force the system to reload the MTM tree for the messaging app, so i saw the folders only if i killed the messaging app and started it again, or if i restarted the whole phone itself. Now im busy at job so can't poke with this for now..
anybody got a hint for this latter problem?
cheers,
simon b
- - - - - - -
simon b
Forum posts: 9
here http://360.yahoo.com/simonkleinn i posted the code because i did not get a chance to deal with it for so long... i hope i help others, and also thank for the posts on the web from other people who helped.
cheers
simon b
- - - - - - -
simon b