$ show pppscn/SmsForwarder
SmsForwarder is an Android application written in Kotlin that monitors SMS messages, incoming calls, and app notifications on a device and forwards them to multiple third-party channels such as DingTalk, WeChat Work, Feishu, Telegram, email, Bark, Webhook, and others. It also provides a local HTTP server for remote control (query/send SMS, call logs, contacts, battery status, location, and Wake-on-LAN) and an automation engine with configurable conditions (cron, battery, network, Bluetooth, location, screen state, etc.) and actions (forward, send SMS, trigger alarm, control frpc tunnels, etc.). The architecture follows a standard Android pattern with Room database, WorkManager for background tasks, XUI for UI components, and a fragment-based navigation system. The codebase is large and feature-rich, with over 15 sender channels and a flexible rule engine, but exhibits some technical debt such as deprecated API usage, hardcoded vendor-specific intents, and a few large monolithic fragments.
The LLM identified 4 files worth highlighting for reuse:
Provides RSA encryption and decryption utilities (public/private key generation, encrypt/decrypt with Base64 encoding). Self-contained and could be extracted into any Android or Java project requiring asymmetric cryptography.
Implements SM4 symmetric encryption/decryption (Chinese national standard) with ECB/CBC modes and PKCS7 padding. Fully self-contained and reusable for projects needing SM4 support.
Parses multi-line rule conditions with indentation-based parent/child relationships. Supports operators like && and ||, and regex matching. Could be extracted as a standalone rule expression parser for any application.
Implements ItemTouchHelper.Callback for drag-and-drop reordering in RecyclerView. Self-contained and reusable in any Android project needing item rearrangement with visual feedback.