Enabling SMS support in Hangouts 2.0 breaks the BroadcastReceiver of SMS_RECEIVED in my app

Fixed it.

The first problem was that, as you can see in revision 2 of my question, I put the priority attribute within the action element, when it actually belongs into the intent-filter element. So the priority didn’t work.

While still targeting API 19, I did some experiences with Hangouts SMS enabled and different priorities.

  • No priority set → BroadcastReceiver doesn’t receive SMS_RECEIVED intent
  • Priority 500 → BroadcastReceiver does receive SMS_RECEIVED intent
  • Priority 9991 → BroadcastReceiver does receive SMS_RECEIVED intent

So it seems that you need to have a minimum value for priority in order to get the intent with Hangouts SMS enabled. I didn’t bother to bisect the lowest possible value. 😉 I am going with 999 as I don’t see any reason to get lower because my app does just some quick checks on the received sms and does not further process it. But it should really make a difference, as the broadcast is non-abortable.

1The maximum value

Leave a Comment