How to notify Incoming message between a player??

Login to reply to this topic.
Mon, 2008-04-14 08:22
Joined: 2008-04-02
Forum posts: 18

Hi,
I want to know how to get notify when there is an incoming message aarrives. I am developing an MP3 player and I want to handle a situation when a msg comes in between, when my player is playing, my player should get pause.

As I have gone through some documents, I got to know I have to use CMsvSession class.

1. OpenAsyncL(). // create session
2. HandleSessionEventL() //Implement this function
but which event will notify about an incoming msg. (???)

I need to create an active class for this (doubt). I have already created an active class for notifying abt incoming call.

What are the steps to get notify abt incoming msg how to handle it??


Wed, 2008-04-16 10:55
Joined: 2008-04-02
Forum posts: 18
Re: How to notify Incoming message between a player??

Hi ,
I have implemented this, my player is getting pause when a msg comes.

Now I have to play it again as msg completetly arrives ( I mean when msg tone comlpetes ) the player should again start playing. I have tried but its not working.

Code is :

void CMsgapp::HandleSessionEventL(TMsvSessionEvent aEvent, TAny *aArg1, TAny *aArg2, TAny *aArg3)
{
        switch(aEvent)
        {
                case EMsvServerReady:
                break;
               
                case EMsvEntriesCreated:
       
                iAppUiPtr->iPlayerAdapter->PauseL();
                if ( (iMsgEntry->Entry().Complete() ) == 1 )
                        {
                         User::After(1000000);  /*after 1 sec*/
                         iAppUiPtr->iPlayerAdapter->PlayL();
                        }
                break;
               
               
       
        }
}

I have also tried with the option in which I play again in EMsvEntriesChanged case but that is also not working. The player goes in the starting state.

Can anyone suggest what is going on wrong.!!!!

  • Login to reply to this topic.