Suppress / Block BroadcastReceiver in another app

Solution 1:

GoSMS does have the priority set to 2147483647, but that is not "maximal" (it is the largest integer) - it is too high. Android documentation for SYSTEM_HIGH_PRIORITY is 1000 (http://developer.android.com/reference/android/content/IntentFilter.html#SYSTEM_HIGH_PRIORITY) and app priority levels should be below this - it is not a system app.

This will create unpredictable behavior. (GoSMS does not always dismiss other app notifications - the abortBroadcast only works when they get it first, usually based on installation order, but not always.) System level apps will execute, then Android will try to sort out non-system apps. If you look at the source code, the order of execution is based on priority level, but the calls to select the order of apps is not consistent for apps over 999 or for apps with the same priority level. It might be in order of installation, but system changes can result in other orders of execution (which I have seen many times with testing this).

This should really be fixed by GoSMS (and many other apps that have it wrong). Just because "priority" is an integer it does not mean that the highest value of integer makes for the highest priority level. (Just like a web URL is a string, but not all string values are valid.) Also, GoSMS should know that other apps may want to process SMS messages that are not visible to the user. If they capture it and display it to the user, that is pointless.

Solution 2:

My intent filter is set to android:priority="0".

This is the lowest possible priority. All other applications will get their chance first before it comes to you. Quoting the documentation:

It controls the order in which broadcast receivers are executed to receive broadcast messages. Those with higher priority values are called before those with lower values. (The order applies only to synchronous messages; it's ignored for asynchronous messages.)

So, they are simply calling abortBroadcast(). They probably have their priority jacked to the roof.