Home
Videos
Android GSM Modem
Send FREE SMS in Java - Receive FREE SMS in Java

Send FREE SMS in Java - Receive FREE SMS in Java

Description

Send FREE SMS in Java - Receive FREE SMS in Java using your android mobile device as GSM Modem device or SMS Gateway. You will find great guide and easy steps to learn; How to send or Receive FREE SMS in your Java project.

In this video tutorial we will go step by step to write sample code for sending or receiving FREE SMS in your Java project. Before getting started you must have installed GSM Modem android application in your device so that you could send or receive SMS from your mobile device.

Prerequisites

Before getting started you must have prerequisites.

Code for Sending SMS

Let's write code for sending SMS in Java first. In following Java code you will find message, phone, username, password, address and port of your android device where GSM modem application is listening for input. Create URL from the variable and hit the GET request to device. In the response you see status of the message.

Filename: SMSSender.java

Code for Receiving SMS

In receiving SMS code, We have made HttpServer our own for listening on particular address and port. The above Jars are required for this Java program. In this program we are making complete header request and hostname and port for the use. The listening address and port number must be entered in your device for forward message from your device to Java project. 

Filename: MyHttpServer.java