android以编程方式进行呼叫转移 [英] android Call Forwarding programmatically

查看:217
本文介绍了android以编程方式进行呼叫转移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将收到的所有电话转接到另一个预定义的电话号码.我搜索了论坛,找到了一些矛盾的答案.所以我很困惑.

I want to forward any calls received to another predefined phone number. I have searched forums and found some contradictory answers. so i m confused.

首先,我查看了此帖子 https://stackoverflow.com/a/5735711 ,这表明不可能通过安卓. 但是另一篇文章有​​一些解决方案. https://stackoverflow.com/a/8132536/1089856

First I looked at this post https://stackoverflow.com/a/5735711 which suggests that it is not possible through android. But another post has some solution. https://stackoverflow.com/a/8132536/1089856

我在第二篇文章中尝试了此代码,但是我收到以下错误消息:呼叫转移连接问题或无效的MMI代码."

I tried this code from second post, but i m getting the following error message: "Call Forwarding connection problem or Invalid MMI Code."

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

5556是要转发呼叫的仿真器(用于测试)的数量.

Where 5556 is the number of emulator (for testing) where i want to forward call.

推荐答案

我认为您需要比模拟器更好地在设备上进行尝试. 您正在使用DTMF代码,所以我认为您需要网络(在实际设备上)而不是仿真器上.

i think you need to try it on the device better than the emulator. You are using DTMF codes, so i think you need network (on the actual device) rather than on the emulator.

在仿真器上拨打相同的代码"** 21 * 5556#"并进行检查.它也不起作用!将5556替换为您要转接呼叫的电话号码,然后在电话上尝试.

Dial the same code "**21*5556#" on your emulator and check. It does not work either! Replace the 5556 with the phone number you want to forward the call to and then try it on phone.

这意味着,DTMF代码仅在不支持SIM卡的模拟器或平板电脑上无法在手机上使用.

Meaning, the DTMF codes would work only on mobiles not on emulators or tablets without SIM support.

您可以在此处找到不同的呼叫转移代码.

you can find different call forwarding codes here.

这篇关于android以编程方式进行呼叫转移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆