我在这个主题上搜索和搜索了两个多小时,但也许我的搜索有问题,因为我没有找到任何东西。
有人可以帮我吗?任何主题,教程,一段代码?
我想监控来电(我想我可以做这部分)并将其中一些发送到语音邮件。我正在使用 Android Level 8 平台 2.2
谢谢...
您可以发送一些代码来激活网络运营商级别的任何号码的呼叫转移,但可能不适用于世界各地的所有运营商。
在这里查看http://en.wikipedia.org/wiki/Call_forwarding
void sendCommand(String command){
Intent intentCallForward = new Intent(Intent.ACTION_CALL);
intentCallForward.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri uri = Uri.fromParts("tel", command, "#");
intentCallForward.setData(uri);
startActivity(intentCallForward);
}
然后转接来电
sendCommand("*21*001234567890#")
并删除呼叫转移
sendCommand("##21#")
您可以使用可能更适合您需求的不同代码
Android 联系人列表中有一个选项,它在联系人的数据库中有一个带有 int 值的列。为了做我在我的问题中提出的问题,您需要在 DB 中更改该值。
1 = 转发到语音邮件
0 = 什么都不做