我想在拨出电话中隐藏电话号码。我尝试使用BroadCastReceiver来做,我可以替换数字但不能隐藏。
public class OutgoingCallReceiver extends BroadcastReceiver {
private static final String TAG = "OutCallReceiver";
@Override
public void onReceive(Context context, Intent intent) {
String orginalNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
Log.d(TAG, ">>>>> orginalNumber:" + orginalNumber);
//This does not work
//intent.putExtra(Intent.EXTRA_PHONE_NUMBER, "");
String resultData = super.getResultData();
Log.d(TAG, ">>>>> resultData:" + resultData);
//This makes end call.
//this.setResultData("");
}
}
我是否必须更换拨出电话屏幕?有没有办法实现它。请帮我。提前谢谢。