×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    62

    Disable incomming message notification

    Hi All,
    I have to disable incomming message notification.i tried with this code but it doesn't work on n95 8 gb.
    Quote:
    TMsvEntry entry(iMsvEntry->Entry());
    if(entry.Unread())
    {
    entry.SetInPreparation(EFalse);
    entry.SetUnread(EFalse);
    iMsvEntry->ChangeL(entry);
    }
    IS there any solution to turn off the notification?Please reply

    thanks

  2. #2
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    62

    Re: Disable incomming message notification

    Hi all,
    I have also tired to play audio file when sms comes but audio file never gets play on n95 8 gb but it works on lower version of 9.1 i.e n73 etc.
    thanks
    Last edited by goldenlife; 2009-03-25 at 07:33.

  3. #3
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: Disable incomming message notification

    Quote Originally Posted by goldenlife View Post
    Hi All,
    I have to disable incomming message notification.i tried with this code but it doesn't work on n95 8 gb.
    Quote:
    TMsvEntry entry(iMsvEntry->Entry());
    if(entry.Unread())
    {
    entry.SetInPreparation(EFalse);
    entry.SetUnread(EFalse);
    iMsvEntry->ChangeL(entry);
    }
    IS there any solution to turn off the notification?Please reply

    thanks
    You just want to disable notification or want to hide the incoming message also? You can try listening on socket for incoming message.

    Regards,
    sumit

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

    Re: Disable incomming message notification

    Quote Originally Posted by goldenlife View Post
    Hi All,
    I have to disable incomming message notification.i tried with this code but it doesn't work on n95 8 gb.
    It has been discussed quite many times on the forum. Just to help you in narrowing your search result, search for SetUnread.
    Nokia Developer Wiki Moderation team

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,335

    Re: Disable incomming message notification

    Quote Originally Posted by goldenlife View Post
    Hi all,
    I have also tired to play audio file when sms comes but audio file never gets play on n95 8 gb but it works on lower version of 9.1 i.e n73 etc.
    thanks
    Playing audio file should work just fine. You should also look into this Wiki article: Playing audio files. Search for "audio" on Forum Nokia Wiki for more related articles

    By the way would you please show your code which is "not working"?
    Nokia Developer Wiki Moderation team

  6. #6
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    62

    Re: Disable incomming message notification

    thanks for reply,

    I have tired both code but setUnread and playing(slient) audio file at high priority when sms comes.i used the http://wiki.forum.nokia.com/index.ph...ng_audio_files this code to play file but it is not working on n95 8 gb,n85 etc..

    thanks

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,335

    Smile Re: Disable incomming message notification

    Ok. I have seen people complaining about this SetUnread() seems not to be working. If you are working on S60 3rd edition, as I see from your posts, then there is another way of achieving it and that is through SMS Utilities API.

    You would find it in the SDK API Plugin pack. Read more about it from here: SMS Utilities API

    PS: Before using that API straight forward, I would suggest you to read this parent article carefully(Top to bottom). SDK API Plug-in
    Nokia Developer Wiki Moderation team

  8. #8
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Disable incomming message notification

    I have used SetUnread on N95 and N95 8 gb and working fine !
    Amit Kankani
    Nokia Developer Champion

  9. #9
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    62

    Re: Disable incomming message notification

    Hi amit,
    Could you please post your code ?I have tired with this.
    case EMsvEntriesChanged:

    if (*(static_cast<TMsvId*>(aArg2)) == KMsvGlobalInBoxIndexEntryId)
    {
    CMsvEntrySelection* entries =
    static_cast<CMsvEntrySelection*>(aArg1);
    iNewMessageId = entries->At(0);

    if( entries->Count() < 1 )
    {
    // Panic(ESmsEngineInternal);
    }
    else if (iNewMessageId == entries->At(0))
    {

    if( !iMsvEntry )
    {
    // Panic(ESmsEngineNotInitialized);
    return;
    }

    // Set entry context to the new message
    iMsvEntry->SetEntryL(iNewMessageId);

    // Check the type of the arrived message and that the
    // message is complete.
    // only SMS's are our consern.
    if ( iMsvEntry->Entry().iMtm != KUidMsgTypeSMS ||
    !iMsvEntry->Entry().Complete() )
    {
    return;
    }



    TMsvEntry MsvEntry(iMsvEntry->Entry());
    if(MsvEntry.Unread())
    {
    MsvEntry.SetInPreparation(EFalse);
    MsvEntry.SetUnread(EFalse);
    iMsvEntry->ChangeL(MsvEntry);
    }



    User::After(KDelayTime);

    iMsvSession->RemoveEntry(iNewMessageId);

    iObserver.MessageDeleted();
    }
    }
    }
    break;





  10. #10
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Disable incomming message notification

    Well this is my MarkRead function:

    Code:
    //------------------------------------------------------------------------------
    // MarkRead
    // Marks the message as read or unread.
    //------------------------------------------------------------------------------
    void CMyClass::MarkRead(TMsvId id, TBool read)
    {
        TMsvEntry msvEntry;
        TMsvId serviceid;
        
        User::LeaveIfError(iSession->GetEntry(id,serviceid, msvEntry));
        if(read) msvEntry.SetUnread(EFalse);
        else msvEntry.SetUnread(ETrue);
        iSmsMtm->SwitchCurrentEntryL(id);
        iSmsMtm->Entry().ChangeL(msvEntry);
    }

    This works for me!

    Between, whenever you post code in the code section, do not disable indentation ...

    hope it helps
    Amit Kankani
    Nokia Developer Champion

  11. #11
    Regular Contributor
    Join Date
    Feb 2006
    Posts
    62

    Re: Disable incomming message notification

    Hi amit,
    thanks for your replay,
    I tried with your code but still message tone is ringing.

    thanks

  12. #12
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Disable incomming message notification

    Oh, but does the message get set to READ first ?

    I guess we cannot disable the message tone this way, we will have to do socket reading of message in that case. I haven't done that anytime though !
    Amit Kankani
    Nokia Developer Champion

Similar Threads

  1. Replies: 0
    Last Post: 2009-01-15, 04:10
  2. problem to send Service Loading push message over 8310
    By alinesimon in forum Mobile Web Site Development
    Replies: 3
    Last Post: 2002-10-23, 07:08
  3. 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
  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
  5. Doubt in Nokia PC Connrctivity SDK 2.1 demo (Visual basic).
    By narumugai in forum General Messaging
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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