SMS shows up in alert box. Why? I have recently been using a particular 2-step authentication system and there is something odd about the SMS messages I am sent which I have never seen before.

When I receive and SMS from the system, there is no notification, and the message does not immediately show up in my hangouts inbox. Instead, the SMS pops up as an alert dialog over whatever I am doing with the phone at the time with the option to "Cancel" or "Save". If I tap "Save", the message is then stored in hangouts and I get a notification.

What I would like to know is why this happens. Is there a (rarely used) part of the SMS specification which provides this functionality? Is this 2-step auth system making use of that? Perhaps setting a flag in the header or something?

EDIT

I am running Android 5.0.2 and the default SMS app is Google Hangouts. I'd like to be clear though that this only occurs when receiving texts for this particular 2-step authentication process. All other messages are received as normal.
Is this 2-step auth system making use of that?


Could be, in order to be sure, we need details on the application. Open the config tool, check the application that is creating the confirmation box, and check if that app has access to read your SMS.


  Perhaps setting a flag in the header or something?


There are no "headers" in the sms PDU. They can either filter by "sending number" (the number from the SMS sender), or by filtering words inside the message. Check if the received message always starts with something such as "X company says..."


  What is going on?


Again, this is speculation, since we saw no details on your problem. But...

It is possible to intercept SMS messages, read then, check for a condition, then use an ordered broadcast to open an application, and given a specific condition, become the default sms app, stop the continuation of sms delivery intents, and erase the message, then stop being the default app, or just let it fly onwards...