Hangup a Call , adopting NotifyExample Code

Login to reply to this topic.
Mon, 2008-06-30 12:36
Joined: 2008-06-15
Forum posts: 48

Hello all

I use s60 3rd FP1 , all capabilities are there .
this is my code :

//Adopted and after re-write

void CNotifyExample::RequestNotification()
    {

   
    _LIT( KNotifyExamplePanic, "CNotifyExample" );
    __ASSERT_ALWAYS( !IsActive(), User::Panic( KNotifyExamplePanic, 1 ));

    iTelephony->NotifyChange( iStatus,
                              CTelephony::EVoiceLineStatusChange,
                              iLineStatusPckg );
    SetActive();
    }


void CNotifyExample::RunL()
    {
    if( iStatus==KErrNone )
       {
      
       if( iLineStatus.iStatus == CTelephony::EStatusDialling )
               {
                       RWsSession ws;
                       ws.Connect();
                       TRawEvent ev1; 
                       ev1.Set(TRawEvent::EKeyDown, EStdKeyNo);
                       ws.SimulateRawEvent(ev1); // CAPABILITY Req. SwEvent
                       User::After(1000000);
                       TRawEvent ev2; 
                       ev2.Set(TRawEvent::EKeyUp, EStdKeyNo);
                       ws.SimulateRawEvent(ev2); // CAPABILITY Req. SwEvent
                       ws.Close();
               } 

       /* Request the next notification */
       iTelephony->NotifyChange( iStatus,CTelephony::EVoiceLineStatusChange,iLineStatusPckg );
       SetActive();
       }
    }


void CNotifyExample::DoCancel()
    {
    iTelephony->CancelAsync( CTelephony::EVoiceLineStatusChangeCancel );
    }

will it perform if my application is in background and voice calls are made not through my application?

  • Login to reply to this topic.