Hello guys, I'm new and I want to make a simple application which retrieve an Incomming Caller Number and vizualize it when I press an option in a app menu. I'm using Nokia C5_00 and Symbian S60 3.2. I found som codes, but I don't know where exactly to implement them in Carbide C++. My base application is Hello World. The one code is :
The Other is :Code:TBuf<100> CallerNumber; if(iCurrentStatus.iStatus == CTelephony::EStatusRinging|| iCurrentStatus.iStatus == CTelephony::EStatusDialling) { CTelephony::TRemotePartyInfoV1 RemInfoUse; CTelephony::TCallInfoV1 CallInfoUse; CTelephony::TCallSelectionV1 CallSelectionUse; CallSelectionUse.iLine = CTelephony::EVoiceLine; CallSelectionUse.iSelect = CTelephony::EInProgressCall; CTelephony::TRemotePartyInfoV1Pckg RemParty(RemInfoUse); CTelephony::TCallInfoV1Pckg CallInfo(CallInfoUse); CTelephony::TCallSelectionV1Pckg CallSelection(CallSelectionUse); iTelephony->GetCallInfo(CallSelection,CallInfo,RemParty); if(iCurrentStatus.iStatus == CTelephony::EStatusRinging) { CallerNumber.Copy(RemInfoUse.iRemoteNumber.iTelNumber); } else if(iCurrentStatus.iStatus == CTelephony::EStatusDialling) { CallerNumber.Copy(CallInfoUse.iDialledParty.iTelNumber); } }
I Want to vizualize the content of "CallerNumber" in the first code or on "aPhoneNumber" in the second code.Code:void GetRemotePartyPhoneNumberL(TDes& aPhoneNumber) { // Create a CTelephony object CTelephony* telephony = CTelephony::NewLC(); 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; // Get the call info User::LeaveIfError(telephony->GetCallInfo(callSelectionV1Pckg,callInfoV1Pckg, remotePartyInfoV1Pckg)); // Copy the remote party's phone number to the target descriptor aPhoneNumber.Copy(remotePartyInfoV1Pckg().iRemoteNumber.iTelNumber); CleanupStack::PopAndDestroy(); // telephony}
Thank you very much and excuse me for bad English.

Reply With Quote

