Bog*_*gus 11 android phone-call
我想自动将拨打我号码的所有号码转发到新的预定义号码.是否可以转接来电?
可能至少对于Froyo来说是可能的.我找到了名为Easy Call Forwarding的应用程序. http://www.appstorehq.com/easycallforwarding-android-189596/app 但是很多人认为它实际上不起作用.
我们可以看到onCallForwardingIndicatorChanged()来自的转发呼叫,PhoneStateListener但我不知道如何设置转发模式.
我在网上探索并得到了我的问题的答案,即如何以编程方式转发呼叫.添加这些代码行,一个人就可以实现它.
String callForwardString = "**21*1234567890#";
Intent intentCallForward = new Intent(Intent.ACTION_DIAL); // ACTION_CALL
Uri uri2 = Uri.fromParts("tel", callForwardString, "#");
intentCallForward.setData(uri2);
startActivity(intentCallForward);
Run Code Online (Sandbox Code Playgroud)
这里1234567890代表电话号码.在此处添加适当的电话号码.可以拨打## 21#来停用该服务.
小智 3
我的解决方案:
Intent intent = new Intent(Intent.ACTION_CALL);
String prefix = "#31#";
prefix = Uri.encode(prefix);
intent.setData( Uri.parse("tel:"+prefix+"123456"));
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9777 次 |
| 最近记录: |