问题 呼叫转移


我想将我的号码的所有呼叫转发到新的预定义号码 自动。是否可以转接来电?

可能至少对Froyo来说是可能的。我找到了名为Easy Call Forwarding的应用程序。 http://www.appstorehq.com/easycallforwarding-android-189596/app 但是很多人认为它实际上并不起作用。

我们可以看到转发的电话 onCallForwardingIndicatorChanged() 从 PhoneStateListener 但 我不知道如何设置转发模式。


2302
2017-08-12 07:52


起源

博格先生:你有没有成功转发电话? Bill_the_Lizard先生:我希望这是可能的,对吗? - Abdul Wahab


答案:


我在网上探索并得到了我的问题的答案,即如何以编程方式转发呼叫。添加这些代码行,就可以实现它。

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

这里1234567890代表电话号码。根据需要添加适当的电话号码。可以拨打## 21#来停用该服务。


8
2017-11-15 06:52



但是这段代码对我不起作用 - Sathish
你遇到了什么错误?我测试了这个,它对我有用。这也适用于gsm数字。 - ASH
Intent.ACTION_DIAL将带您到拨号屏幕,Intent.ACTION_CALL将调用setData()中的号码,因此将直接拨打号码* 21 * your_number#。如果“your_number”正确,这将自动将您的手机置于呼叫转移模式。 - class Android
任何人都可以在程序中告诉我需要在哪里添加这段代码。这是一次性设置吗?即使手机处于飞行模式,此代码也能正常工作吗?谢谢Ganesan S. - Mawy


我的解决方案

Intent intent = new Intent(Intent.ACTION_CALL);  
String prefix = "#31#";          
prefix = Uri.encode(prefix);  
intent.setData( Uri.parse("tel:"+prefix+"123456"));  
startActivity(intent);

3
2018-02-11 10:11