Bahrami-Reza
Bahrami-Reza

Reputation: 608

send and receive sms therough web application

i need to know is it possible or is there any way to submit a Html form through SMS from an application on android device without internet connection and receive it through SMS and store it on database with my application ? i know i should have access to local GSM service provides but the main point is about the end users and i should consider that they don't have access to internet and the should be able to send form through SMS, so if you have any idea or solution let me know please.

i found some API and solution for this issue but seems they need to have internet connection for end user:

smsgateway.me

smssync

znisms

Upvotes: 0

Views: 324

Answers (2)

Gul Muhammad Akbari
Gul Muhammad Akbari

Reputation: 260

You need to do the following in application:

  1. Get your inputs data first
  2. Concatenate them with some delimiter(,_....)
  3. Storing all concatenated data to one variable
  4. Then send it as body of SMS

In Server side:

  1. First get SMS from that port(e.g: 7777)
  2. Explode the SMS with delimter(,_....) that concatenated before
  3. Store the exploded data in server

But remember it will gets a big cost.

Upvotes: 1

kakoma
kakoma

Reputation: 1203

SMS is restricted to 160 characters per SMS. I'm assuming that your subscribers are going to be charged for each SMS (unless you have an agreement with the GSM service provider to zero-rate the SMSs). Generally, the SMSs sent by your application need to be as few as possible. Sending an HTML form is expensive since it sends a lot of useless information.

Do this:

  1. Retrieve the user's input to each of the fields in your form
  2. Clean and validate the input (Remove extra spaces,validate and reject what you don't need immediately so you don't send stuff you don't need)
  3. Combine all the fields into a string separated by whatever separator you want to use, one the user won't have entered in his/her input. Your validation in step 2 can reject user input that uses your separator and offer alternatives
  4. Send that as an SMS to your application
  5. At your application, split the fields, add the HTML (not sure why you'd want to do this, but working with your question) and store that into your database

Upvotes: 1

Related Questions