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
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);
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);
Intent intent1 = (new Intent(Intent.ACTION_CALL, Uri.parse(url)));
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent1);
Can u give an Example
ReplyDeleteExample
DeleteSuppose My Mobile number is 9712589658 and I want all the calls on this number to be forward on any other number like 8802369852, Following code will do it.
String url = "tel:"+"**21*"+ "8802369852"+Uri.encode("#");
Intent intent1 = (new Intent(Intent.ACTION_CALL, Uri.parse(url)));
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent1);
Hello,
DeleteIs der a way to forward sip calls in the same manner?
To Kamlesh Yadav,
DeleteHi
I tried this, but not working for me. Can you plese give me one example code.
Thanks,
Ravi
hiii ravi u might have forgotten to give permnisson in manifiest
DeleteHi,
ReplyDeleteI want to set call forwarding when receiving incoming call. I started the call forwarding activity while phone is ringing. but its not working. saying App has stopped . pls help me to get this?
Hi
ReplyDeleteI want to forward the call when ringing.i am starting the call forward activity when the phone is ringing. but it is not working . how to achieve that?
Thanks, works perfectly.
ReplyDeletehow can i store call with caller name not number ??
ReplyDeletei want to forward a all on user specified number. and that number store in string variable then how can use this code?
ReplyDeletei want to forward a call on user specified number then how can i do that?
ReplyDelete