Skip to content

tiagoxalmeida/android-sms-gateway

 
 

Repository files navigation

Contributors Forks Stargazers Issues Apache 2.0 License


Logo

Android SMS Gateway

Turns your smartphone into an SMS gateway for sending messages via API.
· Report Bug · Request Feature

About The Project

Android SMS Gateway is a lightweight application that allows you to use your Android smartphone as an SMS gateway. With this app, you can send SMS messages programmatically via API, making it ideal for integrating SMS functionality into your own applications or services. The application supports Android 5.0 and above, and offers features such as message status tracking, starting at boot, and protection from going to sleep. Whether you need to send notifications, alerts, or two-factor authentication codes, Android SMS Gateway provides a convenient and reliable solution.

The project is in the MVP stage.

(back to top)

Built With

  • Kotlin
  • Ktor
  • Room
  • Firebase

(back to top)

Getting Started

You can install app to your device from prebuilt APK or by building from sources.

Prerequisites

You need an Android device with Android 5.0 (Lollipop) or above for using the application.

Installation from APK

  1. Navigate to the Releases page.
  2. Download the latest APK file from the list of available releases.
  3. Transfer the APK file to your Android device.
  4. On your Android device, go to Settings > Security (or Privacy on some devices).
  5. Enable the Unknown sources option to allow installation of apps from sources other than the Play Store.
  6. Use a file manager app to navigate to the location of the downloaded APK file.
  7. Tap on the APK file to start the installation process.
  8. Follow the on-screen prompts to complete the installation.

(back to top)

Usage

The Android SMS Gateway can work in two modes: with a local server started on the device or with a cloud server at sms.capcom.me. The basic API is the same for both modes and is documented on the Android SMS Gateway API Documentation.

Send SMS with local server

Application can start web-server on the device, so it can be used without any external services. This mode is recommended for sending messages from local network.

  1. Start the app on the device.

  2. Activate the Local server switch.

  3. Tap the Offline button at the bottom of the screen.

  4. In the Local server section, the local and public addresses of the device, along with the credentials for basic authentication, will be displayed. Please note that the public address is only usable if you have a "white" IP address and have correctly configured your firewall.

  5. Make a curl call from the local network using a command like the following, replacing <username>, <password>, and <device_local_ip> with the values obtained in step 4:

    curl -X POST -u <username>:<password> -H "Content-Type: application/json" -d '{ "message": "Hello, world!", "phoneNumbers": ["79990001234", "79995556677"] }' http://<device_local_ip>:8080/message
    

Send SMS with sms.capcom.me

If you need to send messages with dynamic or shared device IP you can use the cloud server.

  1. Start the app on the device.

  2. Activate the Cloud server switch.

  3. Tap the Offline button at the bottom of the screen.

  4. In the Cloud server section, the credentials for basic authentication will be displayed.

  5. Make a curl call using a command like the following, replacing <username> and <password> with the values obtained in step 4:

    curl -X POST -u <username>:<password> -H "Content-Type: application/json" -d '{ "message": "Hello, world!", "phoneNumbers": ["79990001234", "79995556677"] }' https://sms.capcom.me/api/3rdparty/v1/message
    

(back to top)

Roadmap

  • Ability to change the credentials.
  • Ability to change the local server port.
  • Send notifications to an external server on message status change.
  • Implement scheduling functionality to send messages at specified times.
  • Region restriction to block international SMS

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the Apache-2.0 license. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/capcom6/android-sms-gateway

(back to top)

About

An Android SMS Gateway for sending SMS messages using a local or cloud server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%