how to listen callee hangup call event?

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

how to listen callee hangup call event?

Postby Hex » Sun Oct 26, 2008 8:30 am

Now ,I can use PhoneStateListener to listen some incoming call state
here is the code:

Code: Select all
       public void onCallStateChanged(int state, String incomingNumber) {
               Log.v(TAG, "onCallStateChanged(), Incoming Number: " +

               super.onCallStateChanged(state, incomingNumber);

               switch (state) {
// user hangup call
               case TelephonyManager.CALL_STATE_IDLE:
                       Log.i(TAG, "CALL_STATE_IDLE");
               case TelephonyManager.CALL_STATE_OFFHOOK:
// user pickup call
                       Log.i(TAG, "CALL_STATE_OFFHOOK");
               case TelephonyManager.CALL_STATE_RINGING:
// imcoming call
                       Log.i(TAG, "CALL_STATE_RINGING");
                       Log.w(TAG, "unknown call state: " + state);

As you know ,TelephonyManager.CALL_STATE_IDLE can deal with hangup
event, but I do not know who hangs up the call, the callee? the
caller? ,so,can anyone give me some message about this?
thanks in advance.
Posts: 4
Joined: Sun Oct 19, 2008 3:13 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 6 guests