Android 如何阻止外出通话?
我正在使用以下代码阻止来电Android 如何阻止外出通话?,android,android-emulator,Android,Android Emulator,我正在使用以下代码阻止来电 { telephonyService = (ITelephony) method.invoke(telephonyManager); telephonyService.silenceRinger(); telephonyService.endCall(); } 但我想知道如何阻止外出通话 <receiver android:name="MyPhoneReceiver"> <intent-fil
{
telephonyService = (ITelephony) method.invoke(telephonyManager);
telephonyService.silenceRinger();
telephonyService.endCall();
}
但我想知道如何阻止外出通话
<receiver android:name="MyPhoneReceiver">
<intent-filter android:priority="100">
<action android:name="android.intent.action.PHONE_STATE"></action>
<action android:name="android.intent.action.NEW_OUTGOING_CALL"></action>
</intent-filter>
</receiver>
有了这个你就可以得到这个号码了
查看此项以阻止呼叫检查达曼达尔回答建议。查找固定拨号设置。@lucifer我需要编程设置,因此,搜索使用代码激活固定拨号的代码Hi venkat给你最主要的接收器代码我这样写,但它不工作代码有什么问题吗?我知道如何获得号码,但我不知道如何阻止itcheck检查我为bloacking callin提供的链接,只有他们编写的代码只用于查找传出呼叫。。我需要知道如何停止外呼
@Override
public void onReceive(Context context, Intent intent) {
TelephonyManager telephony = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
CustomPhoneStateListener customPhoneListener = new CustomPhoneStateListener (context);
telephony.listen(customPhoneListener, PhoneStateListener.LISTEN_CALL_STATE);
}