Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
99 views
in Technique[技术] by (71.8m points)

android - Call forwarding

I would like to forward all calls to my number on to the new predefined number automatically. Is it possible to forward incoming call ?

Probably it is possible for Froyo at least. I found application called Easy Call Forwarding. http://www.appstorehq.com/easycallforwarding-android-189596/app But many people reckon it doesn't work actually.

We can notice forwarded call by onCallForwardingIndicatorChanged() from PhoneStateListener but I have no idea how to set forwarding mode.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...