与黑名单联系号码Android 4.0的电话服务API [英] Android 4.0 Telephony API with blacklist for phonenumber
问题描述
由于Android 2.3谷歌已经删除了 -
Since android 2.3 Google has deleted -
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
HTTP://$c$c.google。 COM / P /安卓/问题/详细信息?ID = 54
不过,在Android 2.3的电话和高达4.0 - 有一个函数来添加手机到黑名单。有没有办法以编程方式添加到联系号码黑名单,而无需使用抑制 ITelephony.aidl
?
But on Android telephones 2.3 and up to 4.0 - there is a function to "add phone to blocklist". Is there any way to add phonenumber programatically to blacklist without using rejection of ITelephony.aidl
?
推荐答案
不幸的是,拒接电话的唯一办法就是削减它。而只有这样,才能切断它使用 ITelephony.aidl 。
Unfortunately, the only way to reject a call is to cut it. And the only way to cut it to use ITelephony.aidl.
另一种方式来手机切换到飞行模式和背部。
Another way to switch the phone to airplane mode and back.
所以,你可以设计一个听众来电的应用程序。与此相比,来电的电话号码有可能列入黑名单数据库,然后采取一个匹配的适当行动。
So you can design an app with a listener for incoming calls. Compare that incoming call phone number with a possible black listed database and then take an appropriate action on a match.
这篇关于与黑名单联系号码Android 4.0的电话服务API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!