So far I've tried some things like following; try to check in call log if last call was rejected and the TelephonyManager - ListenToPhoneState, but I'm getting no where with this.
- Code: Select all
private class ListenToPhoneState extends PhoneStateListener {
public void onCallStateChanged(int state, String incomingNumber) {
Log.i("Android telephony test", "State changed: " + stateName(state));
}
String stateName(int state) {
switch (state) {
case TelephonyManager.CALL_STATE_IDLE: return "Idle";
case TelephonyManager.CALL_STATE_OFFHOOK: return "Off hook";
case TelephonyManager.CALL_STATE_RINGING: return "Ringing";
}
return Integer.toString(state);
}
}
I've tried the codesnippet above but there seems to be no phonestate for "BUSY", or am I wrong? I know there are some redial application on Play Store so this is doable, but I'm so badly stuck and been pulling my hair for month's on this problem so any examples or other help are really appreciated.

