问题描述
我想阻止数号码的来电,对于我想要写我自己的应用程序。那么,什么是我应该使用的API?
I want to block calls from few numbers, for that I want to write a app of my own.So what are the APIs which I should be using?
基本上,我想要得到通知,当有电话打进来,我想比较数字,如果它是什么,我想阻止,我想切断电话或静音,或者如果可能的静音,并记录下来。
Basically I want to get notified when a call comes, i want to compare numbers if it is what i want to block, i want to cut the call or mute it or if possible mute it and record it.
推荐答案
OMG!是的,我们能做到这一点!我正想严重24小时调查和发现后自杀......但我发现新鲜的解决方案!
OMG!!! YES, WE CAN DO THAT!!!I was going to kill myself after severe 24 hours of investigating and discovering... But I've found "fresh" solution!
// "cheat" with Java reflection to gain access to TelephonyManager's
// ITelephony getter
Class c = Class.forName(tm.getClass().getName());
Method m = c.getDeclaredMethod("getITelephony");
m.setAccessible(true);
telephonyService = (ITelephony)m.invoke(tm);
所有数百人谁想要开发自己的呼叫控制软件的访问时间this起点
有一个项目。还有很重要的意见(和学分)
there is a project. and there are important comments (and credits)
简单:复制AIDL文件,添加的权限来体现,复制粘贴源电话管理)))
briefly: copy aidl file, add permissions to manifest, copy-paste source for telephony management )))
你一些更多的信息。 AT命令,您可以只发送,如果你是植根。比你能杀系统进程和发送命令,但你需要重新启动,让您的手机接收和发送呼叫=)))
Some more info for you. AT commands you can send only if you are rooted. Than you can kill system process and send commands but you will need a reboot to allow your phone to receive and send calls =)))
我很hapy =)现在我的Shake2MuteCall将得到更新!
I'm very hapy =) Now my Shake2MuteCall will get an update !
这篇关于如何阻止Android的电话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!