how to avoid flicker while using CTelephony

Login to reply to this topic.
Thu, 2008-06-19 13:35
Joined: 2008-04-01
Forum posts: 17

Hi,

i have used CTelephony class to make a call from my application, once the call is cancelled, in the runl i have used the activateviewL to bring my application to foreground,

the problem is it takes some seconds to bring my application to foreground,

now hot to avoid that flicker, or how to avoid that time gap.

can any body help me??


CTestTelephony* CTestTelephony::NewL()
        {
        CTestTelephony* self = new (ELeave) CTestTelephony();
        CleanupStack::PushL(self);
        self->ConstructL();
        CleanupStack::Pop();       
        return self;
        }


CTestTelephony::~CTestTelephony()
        {
        Cancel();
        delete iTelephony;
        }
       
void CTestTelephony::DialL(const TDesC& aNumber)
        {
        if (IsActive())
                //User::Leave(KErrInUse);
                User::InfoPrint(KAlreadyPending);
        else
        {
                CTelephony::TCallParamsV1 callParams;
            callParams.iIdRestrict = CTelephony::ESendMyId;
                CTelephony::TCallParamsV1Pckg callParamsPckg(callParams);
                CTelephony::TTelNumber number = aNumber;
               
                iTelephony->DialNewCall(iStatus, callParamsPckg, number, iCallId);
                iState = ECalling;       

                SetActive();       
        }               
       
        }
       
void CTestTelephony::HangUp()
        {
        if (IsActive())
                User::Leave(KErrInUse);
               
        if (iState != ECalling)       
                User::Leave(KErrNotReady);

        iTelephony->Hangup(iStatus, iCallId);        
        iState = EHangingUp;
       
        SetActive();
        }               

void CTestTelephony::ConstructL()
        {
        CActiveScheduler::Add(this);
        iTelephony = CTelephony::NewL();
        }       
       
CTestTelephony::CTestTelephony() : CActive(EPriorityStandard)
        {
        }

void CTestTelephony::RunL()
        {
        CEikonEnv::Static()->EikAppUi()->ActivateViewL(TVwsViewId(TUid::Uid(0xEBFE9D5D),TUid::Uid(0x00000001)));

        }

void CTestTelephony::DoCancel()
        {
        if (iState == ECalling)
                {
                iTelephony->CancelAsync(CTelephony::EDialNewCallCancel);
                }
        else if (iState == EHangingUp)
                {
                iTelephony->CancelAsync(CTelephony::EHangupCancel);                                       
                }       

        }

  • Login to reply to this topic.