電話の状態が呼び出し音からアイドル状態になったら、アクティビティを呼び出す必要があります。しかし、コンストラクターIntent(MyPhoneStateListener、Class)は未定義であると書かれています。アクティビティを呼び出す方法。
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;
}
}
}