Terminate the call

Put your problem here if it does not fit any of the other categories.

Terminate the call

Postby asbabu123 » Sat Oct 24, 2009 2:15 pm

Hi All,

I have to think to develop the small application for CALL termination. Regarding for i saw the telephony API for getting the CALL events.

I implemented the small code for getting the call events. Here i had the few issues.

1. How can we differentiate the Outgoing and Incoming Calls thourgh code.

2. Is it possible to terminate the Calls(Incoming/Outgoing) through API ? If it possible can any one provide the sample code.

I knew this possibility is available in Blackberry.


Regards,
Suresh A
sureshalapati81@gmail.com
asbabu123
Freshman
Freshman
 
Posts: 5
Joined: Thu Oct 22, 2009 1:15 pm

Top

Postby saif_zeenwala » Mon Nov 23, 2009 2:39 pm

hi

use phonestatelistener for getting differenciation between calls

look at the following code:

class innerClass extends PhoneStateListener {
public void onCallStateChanged(int state, String incomingNumber)
{
super.onCallStateChanged(state, incomingNumber);
switch(state)
{
case TelephonyManager.CALL_STATE_IDLE:
Log.v"DEBUG", "CALL_STATE_IDLE");
break;
case TelephonyManager.CALL_STATE_OFFHOOK:
Log.v"DEBUG", "outgoing");
break;
case TelephonyManager.CALL_STATE_RINGING:
Log.v("DEBUG",
"incoming");
break;


}
for terminating call programmatically use

setResultData(null);


}
}
saif_zeenwala
Junior Developer
Junior Developer
 
Posts: 15
Joined: Mon Nov 02, 2009 7:40 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 12 guests