The following article summarizes the experience of specifying, designing and implementing an information system called RSMS (Roadway State Monitoring System) developed in the city of Bogota, Colombia. The main objective was to measure potholes on roads.
We did not want the tests to be too expensive as all that was needed was an accelerometer and a GPS. The limitations we faced when carrying out the project were related to the roadways where the tests were to be performed and the type of mobile devices that were to be used. The roadways that have a flow of mass transit were given special priority, such as the ones on which articulated buses carrying more than 150 passengers in just one vehicle circulate.
These solutions aim to help people and entities who are responsible for performing preventive as well as corrective maintenance to paved roads through continuous surveillance using their smartphones which are connected to a cartographic server that eases location and quality control of the work done.īased on this context, we set out the need to build a cheaper system, such as the one we currently use, taking full advantage of the smartphone’s sensors and their processing capabilities, which swiftly allow large distances to be reached in a short time. With the help of geographic information technologies, it is possible to establish new-strategy based solutions that use information about the condition of roadways. Palabras clave: Sistemas de Información Geográfica, Sistemas Basados en Localización, Imperfecciones Viales, Computación Móvil, Arquitectura móvil. Este sistema cuenta con una arquitectura móvil escalable que contribuye a capturar información del entorno desde múltiples dispositivos con una gran cobertura geográfica. Un sistema de detección y localización de imperfecciones viales ha sido propuesto con el fin de realizar la recolección de datos de las imperfecciones viales por medio del acelerómetro, GPS y brújula que se encuentran embebidos en los teléfonos inteligentes con sistema operativo Android. Keywords: Geographical Information Systems, Location Based Services, Potholes, Mobile Computing, Mobile Architecture. This system has a scalable mobile architecture that contributes to capturing environment information using multiple devices with a large geographic coverage. First adding the methods for POST requests.A system for the detection and localization of roadway potholes is proposed and is aimed at collecting data on the roadway potholes using the accelerometer, GPS and compass that are embedded into smartphones using the Android operating system. This class contains the methods which will communicate with the API. Call this class Interface and select Kind -> Interface. To create the Interface Class, right-click on the main package and select New -> Java Class. The Communicator methods create RestAdapters that use the Interfaces to perform a server request.
To send data to the server, Retrofit uses a Communicator and an Interface class. The layout includes two EditText elements (username and password), two Buttons and two TextViews to show the server response. The only layout needed for this application is activity_main.xml, change it to the below: Building Android AppĬreate a new project in Android Studio, choosing a minimum API level of 18 and adding a Empty Activity.Īdd a permission to access the internet to AndroidManifest.xml inside the application tag: Īdd the library dependencies to the dependencies section of the adle (Module: app) file: compile '3:logging-interceptor:3.4.0'Ĭompile '2:retrofit:2.1.0'Ĭompile '2:converter-gson:2.1.0'Ĭompile ':gson:2.6.2' Creating login layout
You can find the final code for this application on GitHub. This sample application will simulate a login process by sending two strings (username and password) to the server, waiting for a response, and then show it to the user.
In this tutorial, I will show you how to exchange data between an Android app and a backend PHP application using the retrofit library. Whilst the task became simpler with Google’s Volley library, it has a steep learning curve and Retrofit aims to make the task even simpler.
Specifically: Update for Retrofit v2.1Įxchanging data between a mobile app and a backend server is an essential need for many development projects. This article was updated on 11th January, 2017.