×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    95

    Outbox message deletion problem.....

    Hi

    I am using the following code to delete the message from the outbox..

    void CSmsMmsObserver::HandleOutGoingSms(TAny* aArg1, TAny* aArg2, TAny* aArg3)
    {

    TBool aProceed = EFalse;

    TMsvId folder = *(static_cast<TMsvId*>(aArg2));
    CMsvEntrySelection* pSel=(CMsvEntrySelection *)(aArg1);//reinterpret_cast
    const TInt count = pSel->Count();
    if(folder == KMsvGlobalOutBoxIndexEntryId && count > 0)
    aProceed = ETrue;
    if(!aProceed)
    {
    return;
    }
    TBuf<8> aEmptyTxt = _L(" ");
    CMsvEntrySelection* aSelection = (CMsvEntrySelection*)aArg1;
    TInt incomingMsgId = aSelection->At(0);

    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue);
    CMsvEntry* parentEntry;
    parentEntry = CMsvEntry::NewL (*iSession,KMsvGlobalOutBoxIndexEntryId, sort);
    // parentEntry = CMsvEntry::NewL (*iSession,KMsvGlobalInBoxIndexEntryId, sort);
    CleanupStack::PushL(parentEntry);
    parentEntry->DeleteL(incomingMsgId);

    ....

    }

    But when the message from the outbox is deleted I get from popup
    saying "Message is deleted"..

    Does anyone have idea how to supress this dialog popup..

    Any help in the form of links or document will be highly appreciated..

    Thanks in advance

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: Outbox message deletion problem.....

    in general it is bad idea to delete messages made by other applications, the message might actually come from the application, and thus I think there is no way on removing it.

    All and all, you could of course try, moving the message to the draft folder, before deleting it.

  3. #3
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    95

    Re: Outbox message deletion problem.....

    Thanks for the reply...

    I have already tried to move the message from the outbox to draft then delete it.
    But the default symbian dialog "Message is deleted" still is visible.

    One more thing I observed then when I try to move the message from Inbox to draft
    and then delete it no default message saying "Message is deleted" is being displayed..

    Any idea or suggestion..?

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Outbox message deletion problem.....

    See this Wiki article if it helps: SMS Operations
    Nokia Developer Wiki Moderation team

  5. #5
    Regular Contributor
    Join Date
    Apr 2008
    Posts
    95

    Re: Outbox message deletion problem.....

    Thanks Kiran for reply..

    I am using the sma code form the link you mentioned.

    When I try to delete the sms from outbox its shows the message
    "message deleted"I think which is the s60 message.

    Here is the code snippet

    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue); // we want to handle also the invisible entries

    CMsvEntry* inboxContext=CMsvEntry::NewL(*iSession,KMsvGlobalOutBoxIndexEntryId ,sort);
    CleanupStack::PushL(inboxContext);

    CMsvEntrySelection* entries = inboxContext->ChildrenL();
    CleanupStack::PushL( entries );

    TInt msgCount= entries->Count();
    TInt i;
    for (i=0; i<entries->Count(); i++)
    {
    LogNew(_L("for loop"));
    TMsvId entryID = entries->At(i);
    iSmsMtm->SwitchCurrentEntryL(entryID);

    CMsvEntry* entry= iSession->GetEntryL((*entries)[i]);
    CleanupStack::PushL(entry);

    entry->DeleteL(entries->At(i));
    CleanupStack::PopAndDestroy(entry);
    }
    CleanupStack::PopAndDestroy(entries);
    CleanupStack::PopAndDestroy(inboxContext);
    ....
    }
    Please let me know if I am missing something..
    Is there any way to suppress this s60 message.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Outbox message deletion problem.....

    Quote Originally Posted by chintandhruva View Post
    When I try to delete the sms from outbox its shows the message
    "message deleted"I think which is the s60 message.
    Hi Chintan,

    I am afraid that you can disable/hide that message as it comes from S60 platform. I will try at my end(not sure when) and see if there is another way. Meanwhile you try to find the solution and let me know if you find anything.
    Nokia Developer Wiki Moderation team

Similar Threads

  1. Problem with Cabride.c++ v1.1
    By markovuksanovic in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2007-01-24, 20:05
  2. problem to send a service loading message push for 8310
    By alinesimon in forum General Messaging
    Replies: 1
    Last Post: 2002-05-06, 12:39
  3. Problem to send a service loading push message for 8310
    By alinesimon in forum General Messaging
    Replies: 1
    Last Post: 2002-05-06, 11:19
  4. Problem to send a service loadinfd push message for 8310
    By alinesimon in forum Smart Messaging
    Replies: 1
    Last Post: 2002-05-03, 10: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
  •  
×