Auto Relay

An Android app that forwards incoming messages to email or another number.

View the Project on GitHub yzhong52/auto-relay

Why does Auto Relay use two message paths instead of one?

Android does not provide a single API that covers both SMS and RCS, so the app has to handle each through a different mechanism.

The SMS path

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.

The RCS path

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.

Known limitations of the notification fallback

References