Android redial

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

Android redial

Postby rnyholm » Thu Jan 31, 2013 12:45 pm

I'm trying to implement Redial functionality in one of my applications. I want my application to redial if receiver is "busy".

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.
Once Poster
Once Poster
Posts: 1
Joined: Thu Jan 31, 2013 12:42 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 8 guests