Dismissing Wait Note

Login to reply to this topic.
Tue, 2008-05-27 13:18
Joined: 2008-05-19
Forum posts: 8

Hi All,

I have implemented a wait note which is displayed during an audio recording. I need to dismiss this note when a call comes in. I have implemented a phoneobserver class which handles the incoming call. I need to dismiss the wait note and then stop recording the audio. I am at my wits end, trying to solve this problem. I am pasting the relevant code.

TBool CRecorderAdapter::RunLD()
        {       
        TBool returnvalue = EFalse;

        CRecorderAdapter* ourProcess = new (ELeave) CRecorderAdapter();

        CleanupStack::PushL(ourProcess);

        CAknWaitNoteWrapper* waitNoteWrapper = CAknWaitNoteWrapper::NewL();

        CleanupStack::PushL(reinterpret_cast<CBase*>(waitNoteWrapper));

        if (waitNoteWrapper->ExecuteL(R_AKNEXNOTE_WAIT_NOTE_SOFTKEY_CANCEL, *ourProcess, ETrue))
                {
                returnvalue = ETrue;
                }
        else
                {
                returnvalue = EFalse;
                }

        CleanupStack::PopAndDestroy(waitNoteWrapper);
        CleanupStack::PopAndDestroy(ourProcess);

       
        return returnvalue;
        }

void CRecorderAdapter::DialogDismissedL(TInt aButtonId)
        {
       
        }

void CRecorderAdapter::ProcessFinished()
        {               
       
        }

TBool CRecorderAdapter::IsProcessDone() const
        {
        if (iCount == 101)
                {
                CEikonEnv::Static()->InfoWinL(_L("True"),_L("CWait::IsProcessDone()"));
                }

        return (iCount == 101);
        }

void CRecorderAdapter::StepL()
        {       
        User::After(1);       
       
        if (iCount == 100)
                {
                iCount = 0;
                }
       
        iCount++;
       
        if (iCount == 105)
                {
                User::Leave(KErrCancel);
                }
        }

TInt CRecorderAdapter::CycleError(TInt aError)
        {       
        if (aError == KErrNotSupported && iCount == 3)
                {

                /*_LIT(errMsg, "Error occurred");

                 CEikonEnv::Static()->InfoMsg(errMsg);*/
                iCount++;
                return KErrNone; /*Recovered from error*/
                }
        else
                return KErrAbort;
        }

This code was swiped from S60 3rd Edition SDK. I need to dismiss the wait note before stopping the recording. Please, help me out with this.

Regards,

Shanker


Tue, 2008-05-27 15:04
Joined: 2008-03-12
Forum posts: 30
Re: Dismissing Wait Note

Could CEikonEnv::BusyMsgL() and CEikonEnv::BusyMsgCancel be used for the same purpose?

Tue, 2008-05-27 15:05
Joined: 2007-05-22
Forum posts: 12
Re: Dismissing Wait Note

Hi Shanker,

http://wiki.forum.nokia.com/index.php/How_to_use_the_CAknWaitDialog

Check this link. Hope it helps.
Krisz

  • Login to reply to this topic.