找回密码
 立即注册
the设置拦截NUMBER | android开发 2022-05-30 112 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
源代码介绍
先说以下几点: 1、电话拦截的功能大家可能都知道,就是利用反射原理调用ITelephony的隐藏方法来实现。这个就不说了,附上代码。 2、拦截后提示忙音/空号/关机/关机的功能其实就是使用MMI命令。具体如何设置呼叫转移指定,我们将使用“忙转”。转换功能。中G移动的设置方法是**67#PhoneNumber#,取消方法是##67#。这两个命令可以直接在手机拨号界面输入进行测试。 ITelephony 的 endcall 方法挂断电话后,会提示电话忙。如果提前设置忙时转接空/关机/关机电话号码,则会提示您拨打的电话号码为空/关机/关机。其实你可以下载 xxx Guard 看看。设置呼叫拒绝模式后,将启动设置MMI命令的界面。然后转到“设置” > “通话设置” > “呼叫转移”,查看“忙时转移”中设置的电话号码,然后您可以知道对应的电话号码为空/关闭/关闭。附件是演示项目文件。有几点需要说明: 1.修改变量BLOCKED_NUMBER的值,设置为你要测试截取的电话号码。 2. 所有功能都在一个Activity中实现,所以你应该先运行这个Activity,然后点击“设置呼叫转移”。设置来电转接后,不要关闭该Activity,将无法拦截来电。有兴趣的朋友可以写一个Service在后台运行拦截功能。已经修改为可以拦截短信的版本,希望对大家有用。

(Source code introduction
Let's start with the following points: 1. As we all know, the function of telephone interception is realized by calling the hidden method of itelephony based on the reflection principle. I won't say this, but attach the code. 2. The function of prompting busy tone / empty number / shutdown / shutdown after interception is actually to use MMI commands. We will use "busy forwarding" to specify how to set call forwarding. Conversion function. The setting method of China Mobile is * * 67 \phonenumber\and the cancellation method is \67\. These two commands can be directly input in the mobile phone dialing interface for testing. After the itelephony endcall method hangs up the phone, it will prompt that the phone is busy. If the busy hour transfer empty / off / off phone number is set in advance, you will be prompted to dial an empty / off / off phone number. In fact, you can download XXX guard to have a look. After setting the call rejection mode, the interface for setting MMI commands will be started. Then go to settings & Gt; & call settings; Gt; "Call forwarding", check the phone number set in "busy time forwarding", and then you can know that the corresponding phone number is empty / off / off. Attached is the demonstration project file. There are several points to be explained: 1 Modify variable blocked_ The value of number is set to the phone number you want to test for interception. 2. all functions are implemented in one activity, so you should run the activity first, and then click "set call forwarding". After setting the incoming call forwarding, do not close the activity, and you will not be able to intercept incoming calls. Interested friends can write a service to run the interception function in the background. It has been modified to the version that can intercept SMS. I hope it is useful to you.)

[下载]10443351499.rar




上一篇:Android 类似搜狗输入法android源码
下一篇:Android 具有伸缩效果的ListView源码