
Originally Posted by
skumar_rao
you can't put your application a different priority. (at least i donot know how to do it.) you can only change priorities of a active object not total application.
have to tried getting what ever info from dialed call and hanging it ?
I tried to simulate END-Key Press in a method which is a part of an AO , as follows :
Code:
void CNotifyEngine::RequestNotification()
{
_LIT( KNotifyExamplePanic, "CNotifyEngine" );
__ASSERT_ALWAYS( !IsActive(), User::Panic( KNotifyExamplePanic, 1 ));
Cancel();
iTelephony->NotifyChange(iStatus,CTelephony::EVoiceLineStatusChange,iLineStatusPckg );
SetActive();
}
void CNotifyEngine::RunL()
{
if( iStatus==KErrNone )
{
if ( iLineStatus.iStatus == CTelephony::EStatusDialling) )
{
User::After(1000);
CTelephony::TCallInfoV1 callInfoV1;
CTelephony::TCallInfoV1Pckg callInfoV1Pckg( callInfoV1 );
CTelephony::TCallSelectionV1 callSelectionV1;
CTelephony::TCallSelectionV1Pckg callSelectionV1Pckg( callSelectionV1 );
CTelephony::TRemotePartyInfoV1 remotePartyInfoV1;
CTelephony::TRemotePartyInfoV1Pckg remotePartyInfoV1Pckg( remotePartyInfoV1 );
callSelectionV1.iLine = CTelephony::EVoiceLine;
callSelectionV1.iSelect = CTelephony::EInProgressCall;
iTelephony->GetCallInfo( callSelectionV1Pckg, callInfoV1Pckg, remotePartyInfoV1Pckg );
//FETCH NUMBER FROM NETWORK - MISSING
User::After(10000);
HangUpOnGoingCall();
}
iTelephony->NotifyChange( iStatus,
CTelephony::EVoiceLineStatusChange,
iLineStatusPckg );
SetActive();
}
}
void CNotifyEngine::DoCancel()
{
iTelephony->CancelAsync( CTelephony::EVoiceLineStatusChangeCancel );
}
void CNotifyEngine::HangUpOnGoingCall()
{
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();
}