{"__v":1,"_id":"5810b10208d8050f00948d97","category":{"__v":8,"_id":"54eb63b959b1172100334faf","pages":["54eb63b959b1172100334fb4","54eb63b959b1172100334fb5","54eb63b959b1172100334fb6","551539c3c859ac2f0001b46b","55153c3ac28d6125001b886d","55153e1fc859ac2f0001b470","5515424bc28d6125001b887b","55154597f854a3190036872d","551547cdbc466623002afe73","56c06e1ccfc5470d0018915d"],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-23T16:10:14.298Z","from_sync":false,"order":0,"slug":"getting-started","title":"Getting started"},"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":19,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-26T13:34:58.514Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"Implementing Infobip API is easy and straight forward. In order to demonstrate, we have created a simple demo application which you can use to kick start your own project or just examine how it's done.\n\nApplication has three basic functionalities:\n* Send SMS\n* Get delivery report for sent message\n* Get sent message log\n\n<p align=\"center\">\n[DOWNLOAD INFOBIP SMS DEMO APPLICATION](http://www.infobip.com/assets/downloads/InfobipSmsDemoApp.jar)\n</p>\n\n\nThis application **does not require installation**. Running the file will open the login screen.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Use your Infobip account to login\",\n  \"body\": \"In order to send messages from this demo app, you will need to provide your Infobip account credentials. If you don't have an account yet, please follow instruction here: [Introduction](/docs/getting-started)\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/11c0a04-demoApp1.PNG\",\n        \"demoApp1.PNG\",\n        624,\n        483,\n        \"#f0f0f0\"\n      ],\n      \"sizing\": \"80\",\n      \"caption\": \"Enter Infobip credentials\"\n    }\n  ]\n}\n[/block]\nEnter recipient's phone number and message and hit Send.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/506f5e6-demoApp2.PNG\",\n        \"demoApp2.PNG\",\n        623,\n        481,\n        \"#eeeeee\"\n      ],\n      \"sizing\": \"80\",\n      \"caption\": \"Enter phone number and message text\"\n    }\n  ]\n}\n[/block]\nAfter the message was sent, click logs and delivery report to access message details.\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Used technologies\"\n}\n[/block]\nThe application is a simple desktop program written in Java. For communicating with the Infobip APIs the application uses Infobip’s [java API client library](https://github.com/infobip/infobip-api-java-client). Core business logic is implemented in the adapter classes, e.g. `SendSmsAdapter.java`. Check out those classes to find out how best to use the API client. Along with the code itself, there are **abundant comments and documentation** for clarifying every part of the implementation as well as the behavior of the API client library.\n\nThe user interface is implemented using the [JavaFX](https://en.wikipedia.org/wiki/JavaFX) framework that comes bundled with the Java version 8. The interface itself is kept basic and the code related to the JavaFX is separated neatly into user interface packages. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"There are other online sources for documentation and examples on how to architect applications based on [JavaFX ](http://docs.oracle.com/javafx/2/get_started/jfxpub-get_started.htm) and this demo app does not try to instruct you on that subject. Nevertheless, it does use a clean approach in its setup and can be used as a starting point for your own project.\",\n  \"title\": \"JavaFX\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Where to find code\"\n}\n[/block]\nCode for the demo application is available on the [Github ](https://github.com/infobip/infobip-api-java-demo) and can freely be browsed, checked out and / or forked. To help you get started Git repository contains detailed **readme ** documenting all of the tools and steps required to build and run the app. After going through those steps you can go on to browse the code and try altering it yourself.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Basic code structure\"\n}\n[/block]\nThe application code itself is structured in [per feature packages](http://www.javapractices.com/topic/TopicAction.do?Id=205). That means that all of the code related to, for example, sending of SMS is grouped in a package called **send**. Therein you can find before mentioned `SendSmsAdapter.java` class that implements calls to the Infobip API client library, along with a [POJO](https://en.wikipedia.org/wiki/Plain_Old_Java_Object) (Plain Old Java Object) class used to represent the SMS message in the demo application and an exception class used to indicate problem encountered while sending messages. \n\nAdditionally, send package has a UI (user interface) package inside of it that holds classes implementing parts of the JavaFX framework needed to render the send SMS form and handle user input. You’ll find a similar structure in the other top-level packages, namely **log **and **report**. \n\nA package named **common** houses interfaces and abstract classes used throughout the rest of the application. `SmsApplication.java` is the starting point of the application and implements Java’s main method as well as the JavaFX setup.","excerpt":"","slug":"demo-application","type":"basic","title":"Demo application"}
Implementing Infobip API is easy and straight forward. In order to demonstrate, we have created a simple demo application which you can use to kick start your own project or just examine how it's done. Application has three basic functionalities: * Send SMS * Get delivery report for sent message * Get sent message log <p align="center"> [DOWNLOAD INFOBIP SMS DEMO APPLICATION](http://www.infobip.com/assets/downloads/InfobipSmsDemoApp.jar) </p> This application **does not require installation**. Running the file will open the login screen. [block:callout] { "type": "info", "title": "Use your Infobip account to login", "body": "In order to send messages from this demo app, you will need to provide your Infobip account credentials. If you don't have an account yet, please follow instruction here: [Introduction](/docs/getting-started)" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/11c0a04-demoApp1.PNG", "demoApp1.PNG", 624, 483, "#f0f0f0" ], "sizing": "80", "caption": "Enter Infobip credentials" } ] } [/block] Enter recipient's phone number and message and hit Send. [block:image] { "images": [ { "image": [ "https://files.readme.io/506f5e6-demoApp2.PNG", "demoApp2.PNG", 623, 481, "#eeeeee" ], "sizing": "80", "caption": "Enter phone number and message text" } ] } [/block] After the message was sent, click logs and delivery report to access message details. [block:api-header] { "type": "basic", "title": "Used technologies" } [/block] The application is a simple desktop program written in Java. For communicating with the Infobip APIs the application uses Infobip’s [java API client library](https://github.com/infobip/infobip-api-java-client). Core business logic is implemented in the adapter classes, e.g. `SendSmsAdapter.java`. Check out those classes to find out how best to use the API client. Along with the code itself, there are **abundant comments and documentation** for clarifying every part of the implementation as well as the behavior of the API client library. The user interface is implemented using the [JavaFX](https://en.wikipedia.org/wiki/JavaFX) framework that comes bundled with the Java version 8. The interface itself is kept basic and the code related to the JavaFX is separated neatly into user interface packages. [block:callout] { "type": "info", "body": "There are other online sources for documentation and examples on how to architect applications based on [JavaFX ](http://docs.oracle.com/javafx/2/get_started/jfxpub-get_started.htm) and this demo app does not try to instruct you on that subject. Nevertheless, it does use a clean approach in its setup and can be used as a starting point for your own project.", "title": "JavaFX" } [/block] [block:api-header] { "type": "basic", "title": "Where to find code" } [/block] Code for the demo application is available on the [Github ](https://github.com/infobip/infobip-api-java-demo) and can freely be browsed, checked out and / or forked. To help you get started Git repository contains detailed **readme ** documenting all of the tools and steps required to build and run the app. After going through those steps you can go on to browse the code and try altering it yourself. [block:api-header] { "type": "basic", "title": "Basic code structure" } [/block] The application code itself is structured in [per feature packages](http://www.javapractices.com/topic/TopicAction.do?Id=205). That means that all of the code related to, for example, sending of SMS is grouped in a package called **send**. Therein you can find before mentioned `SendSmsAdapter.java` class that implements calls to the Infobip API client library, along with a [POJO](https://en.wikipedia.org/wiki/Plain_Old_Java_Object) (Plain Old Java Object) class used to represent the SMS message in the demo application and an exception class used to indicate problem encountered while sending messages. Additionally, send package has a UI (user interface) package inside of it that holds classes implementing parts of the JavaFX framework needed to render the send SMS form and handle user input. You’ll find a similar structure in the other top-level packages, namely **log **and **report**. A package named **common** houses interfaces and abstract classes used throughout the rest of the application. `SmsApplication.java` is the starting point of the application and implements Java’s main method as well as the JavaFX setup.