Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor isarc's Avatar
    Join Date
    Apr 2007
    Location
    beijing,china
    Posts
    496
    hi,friends
    i struggled serveral days to disable the icon of incoming sms. i got EFalse.
    can someone help me?
    i can disable the sound,but the icon stilllllllllllllllllll
    Last edited by isarc; 2007-07-24 at 05:26.
    heaven or dell? survival or death?

  2. #2
    Registered User kis_spn's Avatar
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128
    Quote Originally Posted by isarc
    hi,friends
    i struggled serveral days to disable the icon of incoming sms. i got EFalse.
    can someone help me?
    i can disabld the sound,but the icon stilllllllllllllllllll
    hi isarc,

    If want disable icon. then set incoming sms entry READ..icon disappear...It's working well for me. So you can try...


    TMsvEntry entry(iMsvEntry->Entry());
    if(entry.Unread())
    {
    entry.SetUnread(EFalse);
    }

    Have a nice day..!

  3. #3
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    Quote Originally Posted by isarc
    hi,friends
    i struggled serveral days to disable the icon of incoming sms. i got EFalse.
    can someone help me?
    i can disable the sound,but the icon stilllllllllllllllllll
    see this
    TMsvEntry::SetUnread

  4. #4
    Regular Contributor isarc's Avatar
    Join Date
    Apr 2007
    Location
    beijing,china
    Posts
    496
    thank you kkrish.
    i often see you help some people.
    i do like your code, but not work.have you finished this work?
    my code:
    void CSmsHandler::HandleSessionEventL( TMsvSessionEvent aEvent,
    TAny* aArg1, TAny* aArg2, TAny* /*aArg3*/)
    {
    switch ( aEvent )
    {
    // Session to server established
    case EMsvServerReady:
    {
    TMsvId serviceId( KUidMsgTypeSMS.iUid ); // SMS service id

    // Determine if the event was succesful.
    // ServiceProgress inserts TBuf8 value in progress.
    TBuf8<KBfrLength> progress;
    iSession->ServiceProgress( serviceId, progress );
    _LIT8( KCompare, "KErrNone" );

    if ( progress.Compare( KCompare ) )
    {
    // Check that MtmRegistry has not already been accessed.
    if ( !iMtmRegistry )
    {
    AccessMtmL();
    }
    SendUnregisterSMS();
    }

    else
    {
    //error
    _LIT8(KParaname, "EMsvServerReady error, isession wrong");
    TBuf8<64> vParaName(KParaname);
    WriteLog(vParaName);
    break;
    }

    break;
    }

    // A new entry has been created on the message server.
    case EMsvEntriesCreated:
    {

    if(*(static_cast<TMsvId*>(aArg2)) == KMsvGlobalInBoxIndexEntryId)
    {
    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    iNewMessageId = entries->At(0);
    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue);
    CMsvEntry* centry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort);
    CleanupStack::PushL(centry);
    TMsvEntry entry(centry->Entry());

    entry.SetVisible(EFalse);
    if(entry.Unread())
    {
    entry.SetInPreparation(EFalse);
    entry.SetUnread(EFalse);
    centry->ChangeL(entry);
    }
    CleanupStack::PopAndDestroy(centry);

    }
    break;
    }
    case EMsvEntriesChanged:
    {
    if(*(static_cast<TMsvId*>(aArg2)) == KMsvGlobalInBoxIndexEntryId)
    {
    CMsvEntrySelection* entries = static_cast<CMsvEntrySelection*>(aArg1);
    if(iNewMessageId == entries->At(0))
    {
    iSmsMtm->SwitchCurrentEntryL(iNewMessageId);
    TRAPD(err, iSmsMtm->LoadMessageL());
    CRichText& body = iSmsMtm->Body();
    TBuf<140> vSmsContent;
    body.Extract(vSmsContent, 0);
    TMsvSelectionOrdering sort;
    sort.SetShowInvisibleEntries(ETrue);
    CMsvEntry* entry = CMsvEntry::NewL(*iSession, KMsvGlobalInBoxIndexEntryId, sort);
    CleanupStack::PushL(entry);
    entry->DeleteL(iNewMessageId);
    CleanupStack::PopAndDestroy(entry);
    iNewMessageId = 0;
    TBuf8<140> vSmsContent8;
    vSmsContent8.Copy(vSmsContent);
    WriteLog(vSmsContent8);
    }
    }
    break;
    }

    case EMsvGeneralError:
    {
    _LIT8(KParaname, "EMsvGeneralError %d");
    TBuf8<64> vParaName;//(KParaname);
    vParaName.Format(KParaname, aArg1);
    WriteLog(vParaName);
    break;
    }
    default:
    break;
    }
    }
    heaven or dell? survival or death?

  5. #5
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    did you reach till
    entry.SetVisible(EFalse);
    if(entry.Unread())
    {
    entry.SetInPreparation(EFalse);
    entry.SetUnread(EFalse);
    centry->ChangeL(entry);
    }

    in your code if you make it EFalse then the message will not be displayed into the inbox.
    your code looks fine can you tell me Are you reached in if block or not?

  6. #6
    Regular Contributor isarc's Avatar
    Join Date
    Apr 2007
    Location
    beijing,china
    Posts
    496
    sorry to kis_spn, i happened not to see you.

    i will try and tell you the result
    heaven or dell? survival or death?

  7. #7
    Regular Contributor isarc's Avatar
    Join Date
    Apr 2007
    Location
    beijing,china
    Posts
    496
    congratulattion kkrish. champion now.

    i write logfile at there, but it seems the exe can't arrive at there. why? if i donot add code like setunread to avoid icon, i can get the back sms from the server, but if i add those, i will get the back sms serveral minites. why?
    Last edited by isarc; 2007-07-24 at 07:41.
    heaven or dell? survival or death?

  8. #8
    Regular Contributor isarc's Avatar
    Join Date
    Apr 2007
    Location
    beijing,china
    Posts
    496
    hi, all
    i found the method const TMsvEntry& Entry() const in CMsvEntry.
    it can make me disable the sound and sms icon, but how to change the const object? how to contact the special TMsvId with TMsvEntry object?
    heaven or dell? survival or death?

  9. #9
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    you can find TMsvEntry like
    TMsvEntry indexEntry = iSmsMtm->Entry().Entry();

    i do not understand "how to contact the special TMsvId with TMsvEntry object?" ehat does it means?

  10. #10
    Regular Contributor isarc's Avatar
    Join Date
    Apr 2007
    Location
    beijing,china
    Posts
    496
    thank you .
    i think using TMsvEntry to set unread, this unread is used to set special TMsvId. not set other TMsvId. so, how can i know the TMsvEntry object using setunread() will process the incoming sms,not others?
    sorry for my poor English.
    heaven or dell? survival or death?

Similar Threads

  1. How to get that incoming sms interrupt my game?
    By diluo in forum Symbian C++
    Replies: 1
    Last Post: 2006-09-15, 08:48
  2. CVideoPlayerUtility and incoming SMS
    By anttiaa in forum Symbian C++
    Replies: 2
    Last Post: 2006-07-11, 19:02
  3. disable the security questions when sending sms?
    By barfoos in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-10-21, 22:40
  4. 3230 silent mode no incoming sms vibration and more bugs
    By oshioyi in forum General Development Questions
    Replies: 0
    Last Post: 2005-10-06, 11:57
  5. Incoming SMS
    By Utk in forum Symbian C++
    Replies: 3
    Last Post: 2004-11-26, 07:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved