Github: Java SMS API

This article is about how you can make changes to the Java SMS API, located on GitHub, from your computer. This solution will only take about 20 minutes to perform. You will learn how to install Git for windows and TortoiseGit. It will start with downloading Git and will end with the changes you made visible on GitHub. We assume that you are familiar with GitHub and Java. The video is easy to follow and detailed so you will have no problem understanding the process. Don’t waste any time! Let’s go!

How to download the Java SMS API from GitHub (Quick steps)

To download the Java SMS API from GitHub (Figure 1):

  1. Create a GitHub account
  2. Setup GitHub Desktop
  3. Browse to github.com/ozekisms/Ozeki.Libs.Rest.Java
  4. Click Code to copy the link
  5. Clone the Java SMS API in Github Desktop
  6. Paste the copied link on URL tab to Clone
  7. Create a new Apache Netbeans IDE project
  8. Use the cloned folders as Source Packages
  9. Launch Ozeki SMS Gateway
  10. Run the Java SMS API in the IDE

how to download latest java sms library from github
Figure 1 - How to download the latest Java SMS library from Github

Download Github Desktop

To get the latest Java SMS library, you have to download it from Github. To do that, you will need a Github account, and the desktop version of Github. In the following video I'm going to show you how to download the desktop version of Github.
You might want to use this link: https://desktop.github.com/ to download Github Desktop. (Figure 2)

download github desktop
Figure 2 - Download Github Desktop

Video 1 - How to download Github Desktop (Video tutorial)

Install Github Desktop

In order to use Github Desktop we have to install it, and login into our account. If you don't have an account yet, you can use the following link to register: https://github.com/join?source=login
In the following video I'm going to show to how to install Github Desktop and how to login into your account.

Video 2 - How to install Github Desktop (Video tutorial)

Start the installer

If your browser finished downloading the installer, search for it in the downloads folder on your computer. Click it to start the installation process. It will be an application type file named GitHubDesktopSetup-x64. (Figure 3)

start github desktop installer
Figure 3 - Start Github desktop installer

Load page of installer

After you started the installation process, you will be presented with the window visible on Figure 4. It means that the GitHub Desktop application is being installed on your computer. The application will launch as soon as this window disappear.

installation process
Figure 4 - Installation process

Sign in to GitHub Desktop

The next step is to sign in to the GitHub Desktop application. This will require the login credentials of your GitHub user account. Click the Sign in to GitHub.com button to reach the login window. If you have never used GitHub before, you can create a new user account on this page. Click the Create free account link located above the sign in button. It will take you to the new user account creating page. (Figure 5)

sign in to github
Figure 5 - Sign in to Github

Provide username and password

The button will open a new browser window, where you need to log in (Figure 6). In this page, you need to use the username and password for your GitHub account. Type in both to the correct textbox and click the Sing in button to proceed to the next step.

define username and password
Figure 6 - Define username and password

Configure the Git

The Configure Git step will define what information will be visible as a commit detail. Check the Use my GitHub account name and email address checkbox (Figure 7). It means that the information from your GitHub will be used to identify the commits you create. It will be visible to any other GitHub user. Click the Finish button to confirm your settings.

configure git
Figure 7 - Configure Git

Clone the Ozeki.Libs.Rest.Java repository

After you have finished the installation you can go forward with the cloning process.
In the following video I'm going to show you, how to clone the Ozeki.Libs.Rest.Java repository from Github.
To clone the repository you might want to use this link: https://github.com/ozekisms/Ozeki.Libs.Rest.Java

Video 3 - How to clone the Ozeki.Libs.Rest.Java repository (Video tutorial)

Clone a repository from the Internet

To make any changes to the repository, you need to download the files to your computer. This means that you can edit them offline. It is necessary to have your own copy of the files before editing. In the Let’s get started page, you can choose to Create a tutorial repository if you would like to learn more about the GitHub desktop. To edit the files of the Ozeki repository, choose the Clone a repository from the internet option (Figure 8). It will open a new window where you need to copy the URL of the repository you wish to clone.

clone repository from intenet
Figure 8 - Clone repository from Internet

Copy the URL code

Now you need to copy the URL of the repository you wish to make a clone of. To do so, please open GitHub in your browser and open the repository. To copy the URL you have two possible options. The first option is to search for the green Code button located above the list of files (Figure 9). Click it and look for the URL. If you have found it, click the copy icon on the right. The other method is simply copying the URL from the desktop. This will result in the same URL.

copy code url
Figure 9 - Copy code URL

Clone the repository

Paste the URL into the clone repository form. Here you can set which repository to clone with the Repository URL textbox (Figure 10). In the Local path, you need to provide an access path, where a new folder will be created to store the files.

paste url and clone repository
Figure 10 - Paste URL and clone repository

Find the repository on your computer

Open the folder you provided for the Clone the repository. To do so, copy the access path from the form before and past it into the File Explorers top bar (Figure 11). Hit enter and it will start loading the folder.

repository cloned
Figure 11 - Repository cloned

How to use the repository

To use the content of the Ozeki.Libs.Rest.Java repository, you will need an IDE just like the Apache Netbeans.
In the following video, I'm going to show you, how to use the content of the Ozeki.Libs.Rest.Java repository in a new Apache Netbeans project.

Video 4 - How to use the content of the Ozeki.Libs.Rest.Java repository (Video tutorial)

Open the project in NetBeans

To launch the project where you could edit the code, look for the Ozeki.Libs.Rest.Java file. Open the file and in NetBeans. You can edit the code there to your likings. (Figure 12)

open rest api solution
Figure 12 - Open Rest API solution

Start sending SMS messages

Click the Start project button located on the top of the applications GUI (Figure 13). This will start the script and you can start sending SMS messages. In the code editor panel, you can make changes to the code to run it customized.

start send sms solution
Figure 13 - Start send SMS solution

Response from the project

Now you will get the response from the Java project. You will see the result of the SMS sending process, the recipients phone number and the body of the message. As you can see on Figure 14, you will see it printed on a console window.

message sent
Figure 14 - Message sent

Sent SMS in Ozeki SMS Gateway

In case of a successful sending process, you can see the sent message in the Sent folder of the Ozeki SMS Gateway. To reach it, open the Ozeki SMS Gateway and search for the Sent folder under the users' details panel on the left (Figure 15).

sms sent in sms gateway
Figure 15 - SMS Sent in SMS Gateway

Why should you clone the repository?

The answer is easy, if you simply download the content of the Ozeki.Libs.Rest.Java repository, you will have to download the freshest version every time it gets updated. But if you clone the repository, you can get the freshest version of it, by just clicking the fetch button in the Github Desktop application.
In the following video, I'll show you what happens if the content of the repository got updated, and how you can get the freshest version.

Video 5 - How to get the latest version of the Ozeki.Libs.Rest.Java repository (Video tutorial)

Final thoughts

Now, you can take a rest. We hope this guide was as simple as hard we worked to give you the best. By following the above tutorial steps, you can create the solution in a short period of time. Now you can use the Java SMS API to send SMS messages. If you have already completed the steps, you can enjoy a well-deserved latte or some other treat you have in mind. Let me mention that Ozeki SMS Gateway allows you to provide an SMS service to your customers, employees or business applications, and it can help you control the messaging activity of these users. If you would like to discover more valuable information about the benefits of other similar solutions, please open ozeki-sms-gateway.com. I hope this page will be useful to all the readers and especially to beginners.

More information