Facebook’s “Messenger” has a SMS Broadcast Receiver that takes highest priority after reboot

For sure:

If the user downloads your app before facebook, then your receiver will take precedence although both have the priority 2147483647.
After a reboot, Facebook’s receiver takes precedence although both have the same priority and yours was installed before. Therefore, for sure, the trick is in their BootReceiver.

Guesses:

  1. As a first step, add a boot receiver with the same priority 2147483647 (although priority has no effect but just add it) to your app. Try to install your app before facebook’s app and restart the phone. It might be related to the fact that your process starts before facebook in this case and your sms receiver will start before facebook’s.
  2. Do the same thing but rename your package name to a.a.a just to have precedence over facebook Alphabetically.
  3. In your Boot Receiver, try to add the following code:

    ComponentName component;
    component=new ComponentName(this, SmsReceiver.class);
    getPackageManager().setComponentEnabledSetting(component, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
    component = new ComponentName(this, SmsReceiver.class);
    getPackageManager().setComponentEnabledSetting(component, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
    
  4. It might be useful to try to know whether your boot receiver is taking precedence over facebook’s boot receiver. I am not sure if that is possible.

  5. Finally, there is the process which can be differentiated in the manifest but am not sure if that can be handy in anyway.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)