SmsForwarder

repository·main·Indexed 10 days ago

https://github.com/pppscn/smsforwarder

An Android-based tool that monitors SMS, calls, and app notifications, forwarding them to third-party platforms such as Telegram, DingTalk, Email, and Webhooks via customizable rules. Supports Android 4.4 through 13.0. Version 3.0+ includes remote management for SMS, call logs, and device status, while version 3.3+ adds automation tasks and shortcuts.

Tokens
1.5K
Snippets
0
Records
11
Agent score
97%

What's inside SmsForwarder

  1. Overview of SmsForwarder

    main

    SmsForwarder is an Android application designed to monitor SMS, incoming calls, and app notifications on an Android device and forward them to various destinations based on user-defined rules.

    Key Capabilities:

    • Notification Forwarding: Send data to DingTalk (custom bots or enterprise bots), WeCom (group bots or enterprise app messages), Feishu (group bots or enterprise apps), Email, Bark, Webhooks, Telegram bots, Server酱, PushPlus, and other mobile SMS.
    • Remote Control (v3.0+): Includes client and server components to remotely send SMS, check SMS content, check call logs, check contacts, and check battery levels.
    • Automation (v3.3+): Supports automatic tasks and shortcuts for workflow automation.

    Compatibility:

    • Supports Android 4.4 through Android 13.0.
    • Note: The legacy Java-based version is archived in the v2.x branch and is no longer updated.
  2. Upgrade to SmsF Preview Program

    main

    To experience weekly build updates and early bug fixes, you can join the SmsF Preview Program.

    Upgrade Methods:

    1. Online Update: After joining the program, updates can be performed directly from the About Software page in the app (applicable for versions v3.3.0_240305+).
    2. Manual Download: Download weekly builds from the GitHub Actions workflow: https://github.com/pppscn/SmsForwarder/actions/workflows/Weekly_Build.yml
  3. How to upgrade to Weekly Builds (Preview Program)

    main

    To use the weekly builds and participate in the preview program (available for versions v3.3.0_240305+ and later):

    1. Open the app.
    2. Navigate to the About Software (关于软件) page.
    3. Enable the Join SmsF Preview Experience Program (加入SmsF预览体验计划) option to allow online updates.
  4. Download SmsForwarder

    main

    You can download SmsForwarder from the following official and mirror sources:

    Weekly Builds: If you wish to participate in the SmsF Preview Experience Program to test weekly builds and early bug fixes, you can find them via GitHub Actions: Weekly Build Workflow.

  5. Use custom template variable tags

    main

    SmsForwarder uses various tag maps to allow users to create custom message templates. These maps are updated dynamically when the application language changes. Developers can reference these tags to understand what data is available for injection into message templates.

    Key Tag Groups:

    • COMMON_TAG_MAP: General tags like receive_time, current_time, device_name, and app_version.
    • SMS_TAG_MAP: SMS-specific tags like from, sms, card_slot, card_subid, contact_name, phone_area, and rule_title.
    • CALL_TAG_MAP: Call-specific tags like from, msg, card_slot, card_subid, call_type, contact_name, phone_area, and rule_title.
    • APP_TAG_MAP: App-specific tags like uid, package_name, app_name, title, msg, and rule_title.
    • LOCATION_TAG_MAP: Location tags like location, longitude, latitude, and address.
    • BATTERY_TAG_MAP: Battery status tags like battery_pct, battery_status, battery_plugged, and battery_info.
    • NETWORK_TAG_MAP: Network information tags like ipv4, ipv6, ip_list, and net_type.
  6. Access application repositories and databases

    main

    The App class provides lazy-loaded access to the application's core data repositories. These can be accessed via the App instance (typically through the application context in an Android environment).

    Available repositories:

    • database: The underlying AppDatabase instance.
    • frpcRepository: Man/manage Frpc configurations.
    • msgRepository: Access SMS/message logs.
    • logsRepository: Access application logs.
    • ruleRepository: Manage forwarding rules.
    • senderRepository: Manage sender configurations.
    • taskRepository: Manage background tasks.
  7. Reference Rule Field and Check mappings

    main

    When configuring forwarding rules, the following keys are used for fields and comparison logic:

    Field Keys (FILED_MAP):

    • transpond_all: Transpond all
    • phone_num: Phone number
    • msg_content: Message content
    • multi_match: Multi match
    • package_name: Package name
    • inform_content: Inform content
    • call_type: Call type
    • uid: UID

    Check Operators (CHECK_MAP):

    • is: Is
    • notis: Is not
    • contain: Contains
    • startwith: Starts with
    • endwith: Ends with
    • notcontain: Does not contain
    • regex: Regex