Set & Reset Call Forwarding in Android

by Sasikumar 2014-03-10 10:27:52

To Set and Reset Call Forwarding in Android use the following piece of code :
Set Call Forwarding :
String url = "tel:"+"**21*"+forwardCallToPhoneNumber+Uri.encode("#");
Intent intent1 = (new Intent(Intent.ACTION_CALL, Uri.parse(url)));
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent1);
in the above code "forwardCallToPhoneNumber" is the variable holding the phone number to which the call has to be forwarded.

Reset Call Forwarding :
String url = "tel:"+"##21#"+ forwardCallToPhoneNumber+Uri.encode("#");
Intent intent1 = (new Intent(Intent.ACTION_CALL, Uri.parse(url)));
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent1);
above code resets the call forwarding for the number given in "forwardCallToPhoneNumber".
694
like
0
dislike
0
mail
flag

You must LOGIN to add comments