preview

Essay On Android

Good Essays

3) Android Application
The android application is solely built for end users. This application is the one which provides users the opportunity to monitor and control devices remotely.
Android application in this prototype system is a simple native android app. Though it needs the internet for data communication, the trivial web view approach is not been used. Retrofit library, solely built for handling HTTP request, is used here. Using the Retrofit library, android app sends HTTP request to the API server for pulling and pushing the device state changes. The received data is in JSON format. So, for making it usable in the app, GSONConverter is used which maps the data into model.
As it’s a prototype, the user interface as simple as …show more content…

The clients, their houses, rooms and devices need to be added in the database. This admin site helps creating those for service providers without writing any queries or manual database entry. For this prototype, the admin site is built using AngularJS, a JavaScript frontend framework. AngularJS follows the MVC architecture by default. The application in designed similar fashion which makes it almost production ready.
C. Interaction among the section
1) Switch-Arduino-API Server:
As stated earlier, two Arduinos has been used here. Both of them talks to each other through i/o pins like flags. One of these Arduino's only task is to maintain the communication with the API server. It has a function which have a hardcoded URL to fetch device states using API server. And another function to send the latest changes on the database through API server whenever a change is happened is switch state. None of this API calls gets through the authentication system of the API server as the route and corresponding variables are static. For internet connection in the Arduino, the WizFi module is used. It provides Wi-Fi access to the Arduino. The only drawback in the current project comes from this module. The flow of switching a device state from Arduino's point of view would be like the following description. User presses the switch. Arduino (A1) receives the signal and changes both relay states and out flag for change to another Arduino (A2).

Get Access