indianpoptart / RadioControl

An app that auto toggles wifi and cell radio for maximum battery life
https://nikhilp.org/radiocontrol
GNU General Public License v3.0
16 stars 7 forks source link

Calling issues #2

Closed indianpoptart closed 8 years ago

indianpoptart commented 8 years ago

If a call is in progress, and you connect to WiFi, the call gets killed since the app runs through its code. Use this snippet

public boolean isCallActive(Context context){ AudioManager manager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE); 
    if(manager.getMode()==AudioManager.MODE_IN_CALL){
        return true; 
    } 
    else{ 
        return false; 
    }
}
indianpoptart commented 8 years ago

Added in v1.3