xabaras/sms-interceptor ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Android library that makes it easy to listen for incoming SMS messages without having to manually register and unregister broadcast receivers.
I want it to work with an Activity or Fragment lifecycle, so it pauses and resumes automatically when the screen changes, and I can also stop listening whenever I want. Give me a simple callback that returns the sender number and the message text when an SMS comes in.
It should also let me filter messages, either by sender phone number or by the message content. For the content filter, support both a regular expression and a custom check with a simple function. Please include a tiny sample app showing how to start listening and how to use the filters.
If anything about current Android permission handling has changed, look up the latest docs online and follow the right approach for receiving SMS.
Are you gonna build this?
make sure you review the code using arcumet