I have a program that has a broadcast receiver that listens for Phone_State and then sends a user defined intent.
Well, my problem is that the system also sends out an intent (the one that I am trying to replace with my program) .
So I am trying to find a way to CANCEL the systems intent.
I have found that if i have a timer just wait for a little bit, then I can send mine after the systems, but that is not very good, and sometimes defeats the purpose of my program.
Also, i cannot set my program as a default because it is not a full dialer program. Just one action of it.
Someone please help me find how to listen for and cancel a system intent/activity….
You cannot “cancel” an activity, period.
You cannot replace the dialer.
If the system
Intentwas sent viasendOrderedBroadcast(), then you can callabortBroadcast()from yourBroadcastReceiver, and any lower-priority receivers will not get the broadcast. However, I have no evidence thatACTION_PHONE_STATE_CHANGEDis an ordered broadcast, and I sincerely hope it isn’t.Whatever you are trying to do probably should be accomplished via modifications to your own custom firmware.