×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    260

    why it is moving only last sms in inbox?......

    hi 2 all

    i want to move incoming sms in inbox to my folder.for that i have used this code but it only moves the last sms in inbox list......i wnat to move incoming sms.....

    case EMsvEntriesCreated:
    {
    TMsvId* entryId = static_cast<TMsvId*>(aArg2); // entry id from the session event
    if (*entryId == KMsvGlobalInBoxIndexEntryId) // new entry has been created in Inbox folder
    {
    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue); // we want to handle also the invisible entries
    CMsvEntry* parentEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort);

    CleanupStack::PushL(parentEntry);
    CMsvEntrySelection* entries = parentEntry->ChildrenL();
    CleanupStack::PushL(entries);
    parentEntry->MoveL( entries->At(i),KMsvMyFoldersEntryIdValue);

    CleanupStack::PopAndDestroy( parentEntry );
    CleanupStack::PopAndDestroy( entries );
    }
    break;
    }

    but it is moving only last sms from inbox.then for moving the incoming sms i made the changes in HandlesessionEventL() function.the new code i used is.....


    void CSmsHandler::HandleSessionEventL( TMsvSessionEvent aEvent,
    TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)
    {
    switch ( aEvent )
    {
    case EMsvEntriesCreated:
    {
    TMsvId* entryId = static_cast<TMsvId*>(aArg2); // entry id from the session event

    if (*entryId == KMsvGlobalInBoxIndexEntryId) // new entry has been created in Inbox folder
    {
    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    CleanupStack::PushL(entries);

    TMsvId iNewMsgId = entries->At(0);
    CleanupStack::PopAndDestroy( entries );
    }
    break;
    }
    case EMsvEntriesMoved: {
    TMsvId* entryId = static_cast<TMsvId*>(aArg2); // entry id from the session event

    if (*entryId == KMsvGlobalInBoxIndexEntryId) // new entry has been created in Inbox folder
    {
    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue); // we want to handle also the invisible entries

    CMsvEntry* parentEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort);

    CleanupStack::PushL(parentEntry);
    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);

    CleanupStack::PushL(entries);
    for(TInt i = 0; i < entries->Count(); i++)
    {
    parentEntry->MoveL( entries->At(0), KMsvMyFoldersEntryIdValue);
    }
    CleanupStack::PopAndDestroy( parentEntry );
    CleanupStack::PopAndDestroy( entries );

    }
    break;
    }


    i want to know why it is not moving any sms now?......i mean what change i should do for moving incoming sms.......

    any help on this will be highly appreciated.
    awaiting for your valuable reply.

    regards
    bharat

  2. #2
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Re: why it is moving only last sms in inbox?......

    Hi,

    I'm not so sure but have you try this?

    Code:
    case EMsvEntriesCreated:
    {
    TMsvId* entryId = static_cast<TMsvId*>(aArg2); // entry id from the session event
    if (*entryId == KMsvGlobalInBoxIndexEntryId) // new entry has been created in Inbox folder
    {
    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue); // we want to handle also the invisible entries
    CMsvEntry* parentEntry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort);
    
    CleanupStack::PushL(parentEntry);
    CMsvEntrySelection* entries = parentEntry->ChildrenL();
    CleanupStack::PushL(entries);
    parentEntry->MoveL( entries->At(0),KMsvMyFoldersEntryIdValue);
    
    CleanupStack::PopAndDestroy( parentEntry );
    CleanupStack::PopAndDestroy( entries );
    }
    break;
    }

    You managed to create your own folder right? Can you give me some codes on how to do it? I tried before but got problem with setting id for the folder. Is the folder u created a subfolder to Inbox? I want to create folder which can only be seen through my application not default inbox.

    Thanks
    Last edited by ninidotnet; 2007-01-12 at 08:16.
    Regards,
    Nini

  3. #3
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    260

    Re: why it is moving only last sms in inbox?......

    hi
    i have created a new folder inside "My folder" option programatically.
    for that plz go through the link.

    http://discussion.forum.nokia.com/fo...=create+folder



    regards
    bharat

  4. #4
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    260

    Re: why it is moving only last sms in inbox?......

    yah
    i already stated that i tried this code but it moves only last sms in inbox list.
    but i wanna to move incoming sms from list......

    can anybody help me...?

    awaiting for your valuable reply.

    regards
    bharat

  5. #5
    Registered User
    Join Date
    Nov 2010
    Posts
    1

    Re: why it is moving only last sms in inbox?......

    Hi there, cute code. Could there be one in Java. I have been working on a code to hide incoming smses injave to a folder somewhere else but moving it from inbox before itsregistered there has been hectic. Please post the code if available

Similar Threads

  1. SMS: how to write a new received sms into inbox
    By l24012 in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2004-12-21, 01:58
  2. New message in SMS Inbox
    By isseyp in forum Mobile Java General
    Replies: 4
    Last Post: 2004-05-07, 14:45
  3. About get a Sms from Inbox!
    By starryshen in forum Symbian
    Replies: 0
    Last Post: 2004-04-13, 06:06
  4. Replies: 0
    Last Post: 2003-10-02, 18:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×