Hi
my work is when call is incoming than my application not gone on the background but when i click on green Key from my application at that time receive call.
Actually i make two Active Object second active object do work after click on the green key but i not capable to receive call.
please give me solution???
Code:AppUi - ConstructL ------------------- { . . iCallEngine = CMyCallRecieveEngine::NewL(this, ETrue); objectcount = 0; iReceiveCallEngine = CMyCallRecieveEngine::NewL(this, ETrue); objectcount = 1; // capture green and key permanently iReceiveKey = CCoeEnv::Static()->RootWin().CaptureKey( EStdKeyYes,0,0 ); iCancleKey = CCoeEnv::Static()->RootWin().CaptureKey( EStdKeyNo, 0, 0 ); //// Make the application a high priority application CEikonEnv::Static()->RootWin().SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront); iSetforeground = EFalse; SetDefaultViewL(*view1); . . } void CMyCallRecieveAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination) { TBuf<70> log; if (aEvent.Key()->iCode == 63587) { iReceiveCallEngine = CMyCallRecieveEngine::NewL(this,ETrue); } if (aEvent.Key()->iCode == EKeyYes) { iAnswer = ETrue; } CAknViewAppUi::HandleWsEventL(aEvent, aDestination); }
Code:CALLENGINE ------------- void CMyCallRecieveEngine::RunL() { TBuf<70> log; CFileLogger::WriteLogL(_L("In RunL")); if (iFlag) { iCall.AnswerIncomingCall(); iFlag = EFalse; } if(iStatus == 0) { TInt err = iLine.GetStatus(iCallStatus); if(iCallStatus == RCall::EStatusRinging) { RMobileCall::TMobileCallInfoV1 mobCallInfo; RMobileCall::TMobileCallInfoV1Pckg mobCallInfoPckg(mobCallInfo); iCall.GetMobileCallInfo(mobCallInfoPckg); iCallerNumber.Copy(mobCallInfo.iRemoteParty.iRemoteNumber.iTelNumber); iFlag = ETrue; } } if(!iFlag)//else // if do not get ringing status { iCall.Close(); iLine.Close(); _LIT(KClose,"CLOSE CALL & LINE"); CFileLogger::WriteLogL(KClose); //Get info about the first line from the phone RPhone::TLineInfo lineInfo; TInt err1 = iPhone.GetLineInfo( 0, lineInfo ); _LIT(KGetLineInfo,"Get Line Info (zero)if no error: %d"); log.Format(KGetLineInfo, err1); CFileLogger::WriteLogL(log); TInt err2 = iLine.Open( iPhone, lineInfo.iName ); CFileLogger::WriteLogL(lineInfo.iName); _LIT(KRlineOpen,"RLine Open (zero)if no error: %d"); log.Format(KRlineOpen, err2); CFileLogger::WriteLogL(log); CFileLogger::WriteLogL(_L("Again Call Wait Call Function")); WaitCall(); } } Regards Tanya

Reply With Quote

