How to identify the Rejected call and Missed call in android?
<p>How to identify the Rejected calls and Missed calls by using PhoneStateListener? In my code i am sending sms only rejected calls not a missed calls. Please verify below code.</p>

<pre><code>class PhoneStateChangeListener extends PhoneStateListener{
public static boolean wasRinging;

SmsManager smsManager = SmsManager.getDefault();
 @Override
public void onCallStateChanged(int state, String incomingNumber) {

    switch(state){
        case TelephonyManager.CALL_STATE_RINGING:
             Log.e("pppp", "RINGING");
             // Ringing 
            wasRinging=false;
             break;
        case TelephonyManager.CALL_STATE_OFFHOOK:
            Log.e("Lifttttttt", "OFFHOOK");
            //Received calls

             wasRinging = true;
             break;
        case TelephonyManager.CALL_STATE_IDLE:
           Log.e("Endddddddd", "IDLE");
            if(!wasRinging ){

            //Missed or Rejected calls

            }
             wasRinging = true;
             break;
    }

    super.onCallStateChanged(state, incomingNumber);
   }
}
</code></pre>

<p>Edit: Is it possible or not? please give to replay. Thanks.</p>
