title: Need to call a activity in PhoneStateListener
body: <p>I need to call a activity when the phone state comes from ringing to idle. But It says <strong>The constructor Intent(MyPhoneStateListener, Class) is undefined</strong>. How can call the activity.</p>
  
  <pre><code>    public class MyPhoneStateListener extends PhoneStateListener {
          //static String org="";
  
          public void onCallStateChanged(int state,String incomingNumber){
                switch(state){
                  case TelephonyManager.CALL_STATE_IDLE:
                    Log.d("DEBUG", "IDLE");
                   // MissedCall ms=new MissedCall();
  
                   Intent missintent=new Intent(this,MissedCall.class);
                   startActivity(missintent);
  
                  break;
                  case TelephonyManager.CALL_STATE_OFFHOOK:
                    Log.d("DEBUG", "OFFHOOK");
                  break;
                  case TelephonyManager.CALL_STATE_RINGING:
                    Log.d("DEBUG", "RINGING");
                  break;
                  }
                }
      }
  </code></pre>