Giter Club home page Giter Club logo

smshub's Introduction

SMSHub

Update

I'n not currently giving support or updating this app. However I'm using it in a production environment with no issues

what?

SMSHub is an SMS Gateway application for Android phones (Android Studio project developed in Kotlin) you can use to add SMS functionality to your software. It connects to a webpage to retrieve messages to be sent (in JSON format) at regular intervals. It also notifies about delivery status and incoming messages.

why?

Commercial SMS APIs are (for most cases) prohibitively expensive. Instead you can use your own phone line to send SMS with an Android phone as a gateway.

There are other SMS gateways projects but as far as I could check when this project started, none of them can be use to send and receive SMS via HTTP API easily and freely (with no commercial dependencies).

how?

You can download a compiled .apk file from the beta release here

settings

you can customize the next settings directly in the application

Send SMS:

  • Enable sending: whether the app should read from the API and send messages
  • send URL: messages will be parsed from this URL, you return a JSON containing message, number and id
  • interval: the app will check whether there is an incoming message for sending each specific interval in minutes
  • status URL: once a message is sent, status will be reported to this URL via GET parameters, id and status (SENT, FAILED, DELIVERED)

Receive SMS:

  • receive URL: Message received will be posted here. If nothing is specified it will skip this action.

How sending SMSs works

1- The application connects at regular intervals to a URL

POST https://yourcustomurl.com/send_api
    deviceId: 1
    action: SEND

2- It should read a JSON containing message, number and id, or an empty response if there is nothing to send

{ "message": "hola mundo!", "number": "3472664455", "messageId": "1" }

3- The app will send the SMS message to number

4- Once sent (or failed) the app will notify the status to the status URL

POST https://yourcustomurl.com/status_api
    deviceId: 1
    messageId: 1
    status: SENT
    action: STATUS

5- Once delivered the app will notify the status to the status URL

POST https://yourcustomurl.com/status_api
    deviceId: 1
    messageId: 1
    status: DELIVERED
    action: STATUS

Possible status values are: SENT, FAILED, DELIVERED (notice that it is unlikely but possible to get the DELIVERED update before the SENT update due to requests delay).

How receiving SMSs works

1- Each time a SMS is received the app will notify the received URL

POST https://yourcustomurl.com/received_api
    deviceId: 1
    number: 3472556699
    message: Hello man!
    action: RECEIVED

smshub's People

Contributors

juancresc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smshub's Issues

Crashing / not sending

Has anyone got this app to work?
The app crashes ('SMSHub has stopped') every interval, and does not send sms message.
Has anyone experienced this same problem? or found a solution?
This is potentially such a useful app ... shame it isnt working

Run using Node.Js

I can't seems to run using a node.js application.

here's my code:

 async "send.SMS"() {
        try {
            const response = await HTTP.call('POST', 'http://10.0.22.158:3000/api/send', {
                headers: {
                    "Content-Type": "application/json",
                    "deviceId": 1,
                    "action": 'SEND'
                },
                data: {
                    "message": "hola mundo!", "number": "09175437221", "messageId": "1"
                }
            })
            console.log("method called")
            return response
        } catch (err) {
            console.dir(err);
        }
    }

The application keeps closing after 5-6 days

I'm running the application on a samsung s3 mini running android 5.1.1. It works fine except that the app is closing itself after 5-6 days. I would really need the app to stay running all the time.

Problem ...

Hi,

When I run your apk on my phone to send some data on my server in /var/log/nginx/access.log i have this:
5.173.28.92 - - [14/Sep/2021:10:07:56 +0200] "GET /gdzie/ HTTP/1.1" 200 31 "-" "Dalvik/2.1.0 (Linux; U; Android 5.1.1; SM-J120H Build/LMY47V)"
5.173.155.2 - - [14/Sep/2021:16:10:47 +0200] "GET /gdzie/aw HTTP/1.1" 404 143 "-" "Dalvik/2.1.0 (Linux; U; Android 5.1.1; SM-J120H Build/LMY47V)

Error log empty.
In your documentation you wrote that this apk use POST method, but this log says something diffrent.

Regards

Log not updating or not running

I am trying to run this on a ONEPLUS6 with android 9. Does the text app have to be the stock version? The log is not updating as if it is not running at all. Is there another way to monitor it?

I really appreciate the implementation.

Not works

Shows 'ee' and nothing happens...

Not working in background

The app stops working when the phone locks or switches to another app and it stays in the background

what is the maximum number array of messages app can handle at once?

And if I want to use this application for sms OTP verification.
so I will reduce interval to seconds from minutes.
So for example if I set interval 5 seconds and 100 messages in this period. what are the limitations.
what is the maximum number of messages in minimum time period?
Can you talk about limitations?

.

.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.