Discussion Board

Results 1 to 1 of 1
  1. #1
    Regular Contributor Tanya's Avatar
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430
    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
    Last edited by Tanya; 2007-10-26 at 09:10.

Similar Threads

  1. Incoming Call Popup background Problem for my 7610
    By chenloong in forum Themes/Carbide.ui
    Replies: 3
    Last Post: 2007-09-27, 05:54
  2. inComing Call problem os 9.1
    By kkrish in forum Symbian C++
    Replies: 5
    Last Post: 2006-07-26, 12:19
  3. Replies: 3
    Last Post: 2006-02-27, 14:09
  4. Problem with N6680 - Play a video during an incoming call
    By bernie31 in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2005-11-15, 11:35
  5. 6600 Incoming and Outgoing Call Problem
    By dd_aclan in forum General Development Questions
    Replies: 3
    Last Post: 2005-09-02, 21:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved