A native Android background service that watches for keyword patterns in incoming texts and fires a configurable auto-reply in milliseconds. Built for the on-call hustle.
Runs entirely on-device. No server, no webhook, no latency. The Kotlin
BroadcastReceiver fires before the screen even lights up.
reply\s+([\w\d]+) · capture group 1 → sent as reply
Rules stored in filesDir/sms_rules.json — read directly by the native receiver
with no IPC overhead.
npm install && npx expo prebuild --platform android and sideload your own APK.
// fires on every incoming SMS, reads rules from filesDir class SmsReceiver : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { val messages = Telephony.Sms.Intents.getMessagesFromIntent(intent) val rulesFile = File(context.filesDir, "sms_rules.json") val rules = JSONArray(if (rulesFile.exists()) rulesFile.readText() else "[]") for (msg in messages) { for (i in 0 until rules.length()) { val rule = rules.getJSONObject(i) if (!rule.optBoolean("enabled", true)) continue if (!msg.messageBody.contains(rule.optString("keyword"), ignoreCase = true)) continue val reply = Regex(rule.optString("extractPattern"), RegexOption.IGNORE_CASE) .find(msg.messageBody)?.groupValues?.getOrNull(1) ?: continue smsManager.sendTextMessage(msg.originatingAddress, null, reply, null, null) writeLog(context, msg.originatingAddress, rule.optString("keyword"), reply) break } } } }