In my application I have apply new outgoing call receiver. It is working fine. I get whenever new outgoing call is made.
But now, in my device there are two applications for dial call. First is default dialer and second is my own dialer (Using Call_Privilage).
My question is: when I got broadcast for new dial in my receiver at that time how can I know that from which dialer application call is dialed. From default dialer or my own dialer?
I have not implemented this and tested but I assume like this will work for you.
In your own dialer Activity whenever you are calling intent to make a call,
at that time you should pass one more putExtra
with that callIntent
For Ex : callIntent.putExtra("fromMyDialer",1);
Now in your Receiver file, you will be having one method like this below and there you will just need to have check for the extra we passed above.
@Override
public void onReceive(final Context context, final Intent intent) {
if(intent.getIntExtra("fromMyDialer",0)==1)
// from my own dialer activity
else
// from default dialor of phone
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With