Facebook's Messenger, has a priority of 2147483647, for their android.provider.Telephony.SMS_RECEIVED broadcast receiver, declared in their manifest.
(It's sad we are forced to not follow the documentation's standards of max priority being 1000 because other apps make their own rules)
I understand that if my priority is also set to the ridiculously high level of 2147483647 that I'd have to have my app installed first to take precedence over any "ties". No problem, I made a screen to alert users what apps would probably need to be uninstalled then re-installed after my app to function properly.
But, here's the problem - Everything works fine, but as soon as the phone reboots, "Messenger" starts getting precedence over my app. I've looked all over the place to see how they could do this black magic. How do they do this? How do I get priority after reboot, when my app is installed first?
The only thing that has come to mind so far, is package names being ordered alphabetically on boot when registering broadcast receivers.
com. f acebook > com. s trikeforcezero
I was about to attempt to register my broadcast receiver on android.intent.action.BOOT_COMPLETED but I have a feeling this won't work.
Messenger also has another "low priory broadcast receiver" for android.provider.Telephony.SMS_RECEIVED set to -1