Skip to content

FOUNDATIONAIBASED/SMS-GATER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SMS Gateway System

A comprehensive SMS gateway system consisting of two Android applications: SMS-GATER-SERVER and SMS-GATER-CLIENT. This system allows for SMS forwarding, command execution, and remote SMS management through a modern, elegant user interface.

πŸš€ Features

SMS Gateway Server

  • Background Service: Runs continuously in the background, even after app closure and device restart
  • Phone Number Selection: Choose which phone number receives and processes SMS messages
  • SMS Forwarding: Automatically forward SMS messages based on configurable rules
  • Command Processing: Execute commands via SMS with a specific format
  • Modern UI: Beautiful Material Design 3 interface with tabs for different functions
  • Statistics Dashboard: Real-time statistics of SMS processing
  • Documentation: Built-in help and command reference

SMS Gateway Client

  • User-Friendly Interface: Send commands and SMS without seeing the complex command format
  • Quick Commands: Pre-built buttons for common operations
  • Command Builder: Custom command creation with templates
  • Message History: Track all sent messages and commands
  • Settings Management: Configure default server numbers and preferences

πŸ“± Command System

Command Format

All commands follow this specific format:

(command):{Server: [PHONE_NUMBER]}[COMMAND]

For SMS sending:

(command):{Server: [PHONE_NUMBER]}#Destination: [DESTINATION]#[Message: [MESSAGE]]

Available Commands

  1. List All Phone Numbers

    (command):{Server: +14242375122}[List All Phone Numbers]
    

    Returns all phone numbers that have sent SMS to the server

  2. List Server Numbers

    (command):{Server: +14242375122}[List Server Numbers]
    

    Returns all available server phone numbers

  3. Get Server Status

    (command):{Server: +14242375122}[Get Server Status]
    

    Returns current server status (Running/Stopped)

  4. Get Statistics

    (command):{Server: +14242375122}[Get Statistics]
    

    Returns SMS statistics (total, forwarded, commands executed, active rules)

  5. Help

    (command):{Server: +14242375122}[Help]
    

    Shows available commands and their descriptions

  6. Send SMS

    (command):{Server: +14242375122}#Destination: +14342375123#[Message: Hello World]
    

    Sends an SMS from the server number to the specified destination

πŸ› οΈ Setup Instructions

Prerequisites

  • Android Studio Arctic Fox or later
  • Android device with API level 24 (Android 7.0 Nougat) or higher
  • SMS permissions on the device

Building the Applications

  1. Clone the repository

    git clone <repository-url>
    cd SMS-GATER
  2. Open SMS-GATER-SERVER in Android Studio

    • Open Android Studio
    • Select "Open an existing Android Studio project"
    • Navigate to the SMS-GATER-SERVER folder
    • Click "OK"
  3. Build and install the server app

    • Connect your Android device
    • Click "Run" (green play button)
    • Select your device and click "OK"
  4. Open SMS-GATER-CLIENT in Android Studio

    • Open a new Android Studio window
    • Select "Open an existing Android Studio project"
    • Navigate to the SMS-GATER-CLIENT folder
    • Click "OK"
  5. Build and install the client app

    • Connect your Android device
    • Click "Run" (green play button)
    • Select your device and click "OK"

Configuration

Server Setup

  1. Open the SMS Gateway Server app
  2. Grant all required permissions when prompted
  3. Select your phone number from the available options
  4. Configure forwarding rules if needed
  5. Start the server using the "Start Server" button

Client Setup

  1. Open the SMS Gateway Client app
  2. Grant SMS permissions when prompted
  3. Configure the default server number in Settings
  4. Start sending commands and SMS messages

πŸ”§ Permissions Required

Server App

  • RECEIVE_SMS - Receive incoming SMS messages
  • SEND_SMS - Send SMS messages
  • READ_SMS - Read SMS messages from database
  • READ_PHONE_STATE - Access phone number information
  • READ_PHONE_NUMBERS - Read phone numbers
  • FOREGROUND_SERVICE - Run service in background
  • RECEIVE_BOOT_COMPLETED - Auto-start on device boot
  • POST_NOTIFICATIONS - Show notifications

Client App

  • SEND_SMS - Send SMS messages
  • READ_PHONE_STATE - Access phone number information
  • READ_PHONE_NUMBERS - Read phone numbers

πŸ“Š Features in Detail

Server Features

Dashboard

  • Real-time server status
  • Statistics cards (Total SMS, Forwarded SMS, Commands Executed, Active Rules)
  • Recent activity log
  • Quick start/stop controls

Phone Numbers

  • List all available phone numbers
  • Select active phone number for SMS processing
  • Automatic phone number detection

Forwarding Rules

  • Create custom forwarding rules
  • Filter by sender number pattern
  • Filter by message content
  • Enable/disable rules individually
  • Pattern matching support

Commands

  • View all available commands
  • See command examples
  • Recent command history
  • Command execution tracking

Documentation

  • Complete command reference
  • Permission explanations
  • Usage examples
  • System overview

Client Features

Send SMS Tab

  • Server phone number selection
  • Destination number input
  • Message composition
  • Quick command buttons
  • Form validation

Commands Tab

  • Custom command builder
  • Command templates
  • Template usage
  • Command preview

History Tab

  • Message history tracking
  • Command vs SMS distinction
  • Timestamp information
  • History management

Settings Tab

  • Permission management
  • Default server configuration
  • App information
  • Settings persistence

πŸ”„ Background Service

The server app includes a robust background service that:

  • Persistent Operation: Continues running even when the app is closed
  • Auto-Start: Automatically starts on device boot
  • Foreground Service: Shows a persistent notification
  • SMS Interception: Captures all incoming SMS messages
  • Command Processing: Parses and executes SMS commands
  • Forwarding Engine: Applies forwarding rules automatically

🎨 User Interface

Both applications feature:

  • Material Design 3: Modern, elegant UI components
  • Dark/Light Theme: Automatic theme switching
  • Responsive Design: Adapts to different screen sizes
  • Intuitive Navigation: Tab-based interface
  • Visual Feedback: Status indicators and progress tracking
  • Accessibility: Support for accessibility features

πŸ”’ Security Considerations

  • Permission-Based: Only requests necessary permissions
  • Local Storage: All data stored locally on device
  • No Cloud Dependencies: Works completely offline
  • SMS Encryption: Relies on carrier SMS encryption
  • Privacy-Focused: No data collection or analytics

πŸ› Troubleshooting

Common Issues

  1. Permissions Denied

    • Go to Settings > Apps > SMS Gateway Server/Client > Permissions
    • Enable all required permissions manually
  2. Service Not Starting

    • Check if battery optimization is disabled for the app
    • Ensure the app is not force-stopped
    • Restart the device and try again
  3. SMS Not Received

    • Verify the server phone number is correct
    • Check if the server is running (green status indicator)
    • Ensure the device has network connectivity
  4. Commands Not Working

    • Verify the command format is exactly as specified
    • Check that the server number in the command matches the actual server number
    • Ensure the server app is running and has permissions

Debug Information

Enable debug logging by checking the Android logcat:

adb logcat | grep "SMSGateway"

πŸ“ˆ Future Enhancements

  • Web Interface: Remote management through web browser
  • Multiple Server Support: Manage multiple gateway servers
  • Advanced Filtering: Regex-based message filtering
  • Scheduled Commands: Time-based command execution
  • Message Encryption: End-to-end message encryption
  • API Integration: REST API for external integrations
  • Cloud Backup: Optional cloud backup of settings and history

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“ž Support

For support and questions:

  • Create an issue in the repository
  • Check the documentation tab in the server app
  • Review the troubleshooting section above

Note: This system is designed for educational and personal use. Ensure compliance with local laws and carrier policies regarding SMS automation and forwarding.

About

SMS Forward Gate Way with Client for doing sms requests to the sms server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages