Sunday, 2 November 2014

Android Tutorial 22 : How to Forward an Incoming Call In Android

In Android an Incoming Call can be forwarded to any Mobile Number

Here  phoneNumberToForward  is the Nobile Number to whom Incoming Call To be Forwarded


Set Call Forwarding



String url = "tel:"+"**21*"+ phoneNumberToForward+Uri.encode("#");
              Intent intent1 = (new Intent(Intent.ACTION_CALL, Uri.parse(url)));
              intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
              startActivity(intent1);


Reset Call Forwarding


To Cancel/Reset the Call forwarding

String url = "tel:"+"##21#"+ phoneNumberToForward+Uri.encode("#");
               Intent intent1 = (new Intent(Intent.ACTION_CALL, Uri.parse(url)));
               intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
               startActivity(intent1);

No comments:

Post a Comment