jjzjj

itelephony

全部标签

android - itelephony.aidl answerringingcall() 不起作用

我正在尝试在我的应用程序中使用ITelephony.aidl。使用这个我想接听来电。我设法使用了endcall()并且它工作得很好。但是,当我尝试使用answerringingcall()时,它会抛出错误并提示需要MODIFY_PHONE_STATE,但不能使用,因为它仅适用于系统应用。那么有什么方法可以在android2.3及更高版本上使用它吗?或者还有其他方法可以接听电话吗?提前致谢:)这是我的代码。`publicvoidcallAnswer(){try{Classc=Class.forName(telephony.getClass().getName());Methodm=c.g

android - ITelephony.endCall() 不再适用于阻止 Android 8/Android O/API 26 中的调用

我有一个应用程序使用以下代码来阻止调用:TelephonyManagertelephonyManager=(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);try{ClasstelephonyManagerClass=Class.forName(telephonyManager.getClass().getName());MethodgetITelephonyMethod=telephonyManagerClass.getDeclaredMethod("getITelephony");getITelephonyM

android - 如何在 android 中解决此错误 "com.android.internal.telephony cannot be resolved to a type"

我正在创建简单的调用过滤器应用程序来限制不需要的调用。我使用以下代码来限制调用,但我无法在下面的代码“com.android.internal.telephony.ITelephonytelephonyService=(ITelephony)m.invoke(tm);”中解决此行的问题它显示错误消息com.android.internal.telephonycannotberesolvedtoatypeinandroidhowtoresolvethiserror。publicclassCallBlockReceiverextendsBroadcastReceiver{@Override

android - ITelephony.aidl 未在 Eclipse 中编译

我正在使用thisanswer的代码,因为我必须添加ITelephony.aidl到我的项目源,我做到了。但是这个aidl文件没有编译。是否需要任何其他步骤? 最佳答案 首先在项目的src文件夹中创建一个名为com.android.internal.telephony的包,然后在该包中创建一个文件并复制粘贴接口(interface)ITelephony,并将文件另存为ITelephony.aidl。编译时,您将在gen文件夹中获得ITelephony的.java文件。这就是我所做的,我的问题得到了解决。希望对你有帮助

android - 如何在android中阻止调用

我想阻止来自几个号码的调用,为此我想编写自己的应用程序。那么我应该使用哪些API?基本上我想在来电时得到通知,如果是我想阻止的,我想比较号码,我想切断通话或将其静音,或者如果可能的话将其静音并记录。 最佳答案 天哪!!!是的,我们可以这样做!!!经过24小时的严酷调查和发现后,我打算自杀……但我找到了“新鲜”的解决方案!//"cheat"withJavareflectiontogainaccesstoTelephonyManager's//ITelephonygetterClassc=Class.forName(tm.getClas

android - 如何在android中阻止调用

我想阻止来自几个号码的调用,为此我想编写自己的应用程序。那么我应该使用哪些API?基本上我想在来电时得到通知,如果是我想阻止的,我想比较号码,我想切断通话或将其静音,或者如果可能的话将其静音并记录。 最佳答案 天哪!!!是的,我们可以这样做!!!经过24小时的严酷调查和发现后,我打算自杀……但我找到了“新鲜”的解决方案!//"cheat"withJavareflectiontogainaccesstoTelephonyManager's//ITelephonygetterClassc=Class.forName(tm.getClas