Send SMS Using SMS Gateway from Android

In Android, you can use SmsManager API or devices Built-in application to send SMS’s. Therefore in this tutorial, we shows how to send SMS message using SMS Gateway from android. However Some times it’s important to inform user about changes made to there account by email or sms. Such as verification codes,conformations etc, please let me present some interesting facts in this topic.

At this point about 5.1 billion out of the 6.8 billion people on Earth own a mobile phone – that’s a huge.

There are twice as many active SMS users in the world than active users of email.

On average, it takes 90 minutes for someone to respond to an SMS (by comparison, the response time in case of e-mail is 90 minutes).

Around 98 per cent of all messages are opened, but only 20 per cent of emails are looked at.




 

send-sms-using-way2sms-android logicchip1

 

Android

Of course first is the android part, it transmit address of the recipient and message to be send. In order to transmit network data we are  using volley. And also the response is received by volley network library. As a matter of fact internet permission is required for this project.

Server

In fact way2sms don’t provide an official api for users. Still there are several api’s available unofficially. As a result of googling found a suitable api. Then modified it to work with android. However you can use wamp or any other free hosting providers as server. In the same way api working and it’s integration is explained below.



Introduction

Accordingly there is a lot of free Sms sending web portals available on the internet. Therefore people use them to send bulk and nonbulk Short messages without any charge. Still Way2Sms is one of the No.1 SMS Portal on the World Wide Web almost 1 million users were registered with them and send millions of message per day. Hence you are going to learn about the Way2Sms Php API Script Integration in an android app in this article.

How Way2Sms API  Script Works:

Consequently by integrating the Way2Sms Php API Script in your app, Your can send  SMS Directly through your app. You are never redirected to Way2Sms official site for login or another purpose. Because every action will take place through your server itself. You can also modify the script design like yours . Because the code was developed using PHP and it was too simple.

How to Integrate Way2Sms PHP API Script:

In fact it’s very easy to integrate the PHP API script on your app or website. In order to do this, you must have a Php Enabled Server (Cpanel). If you don’t have a PHP Supported Server, then create a free A/c on any of the site that listed on the linked page: Link Here

 

After creating an A/c or log in to your Existing Cpanel A/c, Do the following steps and procedure to integrate the  API script on your website. Or you can use wamp instead.

Above all first Download the script from here: Download,

Then Go to File-Browser of your Cpanel A/c & Create a “New Folder” name “androidsms”.

Afterward Upload the “12sms.rar” Downloaded the file to the “androidsms”.

Next Extract the “12sms.rar” File.

Run like: “http://example.com/androidsms/sms.php”.

You are Done.

SMS Gateway

Accordingly a SMS gateway allows a computer to send or receive Short Message Service transmissions to or from a telecommunications network. Most messages are eventually routed into the mobile phone networks. In fact it’s able to send the messages coming from your Android application through HTTP to the SMSC (Short Message Service Center) of the Mobile Service Provider via SMPP IP SMS connection or a GSM modem. However the SMSC is a network element in the mobile telephone network that stores, forwards, converts and delivers SMS messages. Still to be able to send messages using HTTP, you will need an SMS Gateway that has a built-in webserver. In conclusion it allows you to send text messages from your application by calling an URL (HTTP Get) or using the HTTP Post method.

 

Sms.php

In addition below is the modified php script for sending message. It also require other script’s from the rar file.

 

MainActivity.java

Class file contain the sending of information  number and message.

 

Incidentally here is the full code for android: Download.

8 thoughts on “Send SMS Using SMS Gateway from Android

Leave a Reply

%d bloggers like this: