来电时改变主叫号码 [英] change the caller's number during an incoming call
本文介绍了来电时改变主叫号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
首先,我找到了一种方法传出呼叫过程中修改被叫号码。 我想同为来电号码来电时,但我唯一能做的就是读取来电的号码,而不是改变它。有人可以给我一个提示?
First I found a way to modify the called number during an outgoing call. I tried the same for the caller's number during an incoming call, but the only thing I can do is read the caller's number, not change it. Can someone give me a hint?
我的code在收到至今:
My code in on receive so far:
Bundle b = intent.getExtras();
Log.d(TAG, "Phone State: "+ b.getString(TelephonyManager.EXTRA_STATE));
incomingNumber = b.getString(TelephonyManager.EXTRA_INCOMING_NUMBER);
Log.d(TAG, "incoming number: "+ incomingNumber);
我怎么能进行呢?
How could I proceed?
推荐答案
我不认为这是可能的。这是因为默认的呼叫活动和接收机得到相同的意图。你是不是真的拦截它。一个解决办法是在默认的显示你自己的活动。
I don't think this is possible. This is because the default call activity and your receiver get the same intent. You are not really intercepting it. A work around is to display your own activity over the default one.
这篇关于来电时改变主叫号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文