Call forwarding

I explored on the net and got the answer to my question that how one can forward a call programmatically. Add these lines of code and one will be able to achieve it.

String callForwardString = "**21*1234567890#";    
Intent intentCallForward = new Intent(Intent.ACTION_DIAL); // ACTION_CALL                               
Uri uri2 = Uri.fromParts("tel", callForwardString, "#"); 
intentCallForward.setData(uri2);                                
startActivity(intentCallForward); 

Here 1234567890 represents the phone number. Add the approriate phone number as you wish here. One can dial ##21# to deactivate the service.

Leave a Comment