An Android app that forwards incoming messages to email or another number.
Android does not provide a single API that covers both SMS and RCS, so the app has to handle each through a different mechanism.
SmsReceiver listens for android.provider.Telephony.SMS_RECEIVED. This is the standard telephony broadcast that Android has supported for years. Any third-party app with RECEIVE_SMS permission can use it.
RCS messages in Google Messages do not trigger SMS_RECEIVED. They go through an entirely separate path in the system and are never delivered as SMS PDUs, so SmsReceiver never sees them.
Android does include ImsRcsManager (added in API 30), but it is restricted to system apps and whitelisted vendors — over 30 methods are marked @hide in AOSP. There is no public API that lets a third-party app receive incoming RCS messages directly.
Because of that, MessageNotificationListenerService intercepts Google Messages notifications as a best-effort fallback. This is the same approach used by other third-party SMS/RCS apps (Textra, Pulse SMS, etc.). It is not a workaround unique to Auto Relay — it is the only door Android leaves open.
EXTRA_BIG_TEXT first, then falls back to EXTRA_TEXT, but neither is guaranteed to be the full message body.com.google.android.apps.messaging. If the user’s default RCS app is Samsung Messages (com.samsung.android.messaging) or another client, those messages will not be captured.