proceedings template - word  · web view16/11/2013 · the traffic alert application is designed...

13
Context Based Traffic Alert System. ABSTRACT The Traffic Alert Application is designed to work on android platform devices. The Traffic Alert Application consists of multiple client applications residing on Mobile Hand held device. The idea behind the app is to provide the user with traffic incident alerts, while standing at one place or moving between two locations. The user can define a specific radius in miles, which the app will scan and alert the user if there is any traffic incident in that radius. If the user is traveling between locations, and some incidents happens on the specific route which the user is currently following then app will show alternative routes to that destination. User will be given the option to set destination address, radius for app to scan for traffic incidents, start and stop the app as a background service, in the application settings menu. On the Initial launch, the mobile application shows the current location of the user and the default scanning radius is 1 mile. Keywords Traffic incident alerts, geo-locator, scanning radius, alert service, web service, alternative routes . 1. INTRODUCTION The traffic alert system is specifically developed to facilitate the user while traveling and avoiding traffic congestions and blockages. The application helps by alerting the user with the traffic incidents that may have disrupted or blocked the flow of traffic in the radius defined by the user, and then application shows user the alternative routes to the destination. So application is mainly defined to help, facilitate and save time of the user. There have been few other apps which inform the user about the traffic incidents that occur around the user’s location and also provide alternative routes, but the services never let the users to choose the radius of scanning. It also has been made sure that the web service providing the traffic incident alerts is up-to-date and accurate. Apart from providing traffic incident alerts, it also notifies the user if the road is blocked due to construction work. In that case, alternative routes to the destination will be shown on the map. The learning experience from the project has been immense. Firstly, the design and develop of android applications is a huge learning area. Also, we have learnt integration of web-service with Android applications. The web-service is used for finding out multiple routes in the Google Maps, and the scanning for incidents within specific radius. The development of the application is an outcome of research of a good number of publications. 2. APPLICATION STRUCTURE This chapter depicts system design methodologies. Use-case Diagram Figure 1 shows the use case diagram

Upload: nguyentu

Post on 02-Dec-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Context Based Traffic Alert System.

ABSTRACTThe Traffic Alert Application is designed to work on android platform devices. The Traffic Alert Application consists of multiple client applications residing on Mobile Hand held device. The idea behind the app is to provide the user with traffic incident alerts, while standing at one place or moving between two locations. The user can define a specific radius in miles, which the app will scan and alert the user if there is any traffic incident in that radius. If the user is traveling between locations, and some incidents happens on the specific route which the user is currently following then app will show alternative routes to that destination. User will be given the option to set destination address, radius for app to scan for traffic incidents, start and stop the app as a background service, in the application settings menu.

On the Initial launch, the mobile application shows the current location of the user and the default scanning radius is 1 mile.

KeywordsTraffic incident alerts, geo-locator, scanning radius, alert service, web service, alternative routes.

1. INTRODUCTIONThe traffic alert system is specifically developed to facilitate the user while traveling and avoiding traffic congestions and blockages. The application helps by alerting the user with the traffic incidents that may have disrupted or blocked the flow of traffic in the radius defined by the user, and then application shows user the alternative routes to the destination. So application is mainly defined to help, facilitate and save time of the user.

There have been few other apps which inform the user about the traffic incidents that occur around the user’s location and also provide alternative routes, but the services never let the users to choose the radius of scanning. It also has been made sure that the web service providing the traffic incident alerts is up-to-date and accurate. Apart from providing traffic incident alerts, it also notifies the user if the road is blocked due to construction work. In that case, alternative routes to the destination will be shown on the map.

The learning experience from the project has been immense. Firstly, the design and develop of android applications is a huge learning area. Also, we have learnt integration of web-service with Android applications. The web-service is used for finding out multiple routes in the Google Maps, and the scanning for incidents within specific radius. The development of the application is an outcome of research of a good number of publications.

2. APPLICATION STRUCTUREThis chapter depicts system design methodologies.

Use-case Diagram

Figure 1 shows the use case diagram

Figure 1: Use case diagram

Development Modules and Classes

Class: IncidentFinder

IncidentFinder is the main Activity class containing two tabs, one to show the map and the other for the application settings

Class: IncidentMap

This class containing the main layout of Map View (mapView) and displays the Google map, using the API provided by android.

Using the Google maps library one can create own map-viewing activity.

Class: SettingsActivity

The class SettingsActivity is responsible for complete application settings and monitoring of user actions, it passes the user input to the traffic alert service to act upon.

This class will check whether the user is traveling or stationary. The class will accept the destination address ,if the traveling box is clicked.

Class: GPSTracker

This service is written to monitor the GPS location using different options if GPS is enabled it will check user last location’s latitude and longitude and passes to service. If GPS is not enable than it find the location from the wireless network connected with device and again passes to backend web service.

If the GPS is not enabled on the phone and no WIFI services are available, the system will alert the user to enable the GPS on the phone.

Class: AlertCheckingService

AlertCheckingService is the main class that requests the MAPQUEST web service and gets response for the traffic incidents from the current location of the user between the radiuses mentioned in settings.

After parsing the response it calls to IncidentMapActivity Class to show alerts to the user.

Class: Google Parser

The class has been used to parse JSON response received from Google API’s for alternative routes. The JSON format is used for serializing and transmitting data between a server and a web/mobile application.

Interface: Parser

It is an interface implemented by the GoogleParser class.

Class: Route

Route class is used for getting multiple routes from JASON object response returned by Google API and parsed by GoogleParser.

Class: Route Overlay

The RouteOverlay class is responsible for mapping alternative routes over Google maps.

Class Diagram

Figure 2 shows the complete class diagram with classes and their relations.

Figure 2: Class diagram

Sequence Diagram for Show alerts

Figure 3 shows sequence diagram for showing traffic incidents

Figure 3: Sequence Diagram for Show alerts

Sequence Diagram for Showing Alternate Routes

Figure 4 shows sequence diagram for showing alternate routes

Figure 4: Sequence Diagram for Showing Alternate Routes

Activity Diagram for Showing Alternate Routes

Figure 5: Activity Diagram for Showing Alternate Routes

FLOW OF APPLICATION

User starts the application, the app at the startup show two tabs. One tab contains the Maps on which different routes will be plotted and shown. When launched, the map shows the current location of the user.

Figure 6: Application UI for Map

The second tab contains the settings for the application from the where user will be allowed to enter the destination address, give radius in miles, start or stop application background service.

Figure 7: Application UI for Settings

The app runs and captures the current location of the user using GPSTracker service and indicates it using a Go Locator on the map.

After starting the traffic alert app service, the GPS Tracker service passes the current location of the user to AlertChecking service. When the service starts it acquires the radius from settings and calculates the longitude and latitude and requests the web service to return any incident information inside that radius specified by the user.

The web service returns the information, the parser is used to parse and find any credible information about the incident that may be present in the traffic alert web service response. If the parser finds any information regarding traffic incidents it invokes the map and alerts the user.

If user enters destination and checks the travelling checkbox, then the app will show alternative routes on the map, to that particular destination if the incident occurred on the route that the user is currently following.

3. Application System Architecture

Figure 8: Deployment diagram for Android application

The mobile client is implemented for the Android (version 3.0) operating system, and the project presumes that the mobile device will possess enough storage space in internal storage. In order to work the application properly user has to enable the GPS receiver or should be in a Wi-Fi connectivity, which will sense the location. Figure 8 shows the deployment diagram for Android application.

The development of the Application was done on Android Developer tools suite (V21.1.0), which includes Eclipse platform.

4. Google Maps API

The Google map is used to get the location of the user at a point of time. The Google Static Maps API lets you embed a Google Maps image on your web page without requiring JavaScript or any dynamic page loading. The Google Static Map service creates your map based on URL parameters sent through a standard HTTP request and returns the map as an image you can display on your web page.

There is a usage limit of 25000 static map requests per day.

5. Application Testing

The mobile application was tested on different mobile devices and was running successfully. In some places, the Google map API is showing slight variation in user’s current location.

Here is our test plan:

Testing 1 Test number: T001 Test title: Two tab view creation

Description: The test verifies whether two tabs are successfully created

Activity: Open the application and check tabs Expected result: There will be two tabs: one showing

Map and another showing Settings Actual output: Ok

Testing 2 Test number: T002 Test title: Start service Description: The test verifies starting of alert checking

service Activity: Open the application, go to Settings tab and

click “start” Expected result: There will start the service and alert

will be shown in alert text box. Actual output: Ok

Testing 3 Test number: T003 Test title: Show alternate routes Description: The test verifies of showing alternate

routes for a source and destination Activity: Open the application, provide destination and

check Travelling Expected result: After certain time it should show

alternate routes in Map tab Actual output: Ok

Testing 4 Test number: T004 Test title: Get GPS location Description: The test verifies GPS location of the

mobile device Activity: Enable GPS, open the application and after

certain time check the Map tab whether current location of the mobile device is showing fine

Expected result: It should show current location of the mobile

Actual output: Ok

Testing 5 Test number: T005 Test title: Get Wireless location Description: The test verifies location received from

wireless network of the mobile device Activity: Disable GPS, open the application, move to

some other place and after certain time check the Map tab whether current location of the mobile device is showing fine

Expected result: It should show current location of the mobile

Actual output: Ok

6. Launching Traffic Incident Alert App1. Click on the TrafficIncidentFinder (Figure 9)

Figure 9: Application Icon

2. The App opens with the current Location Map.(Current location is 32258,Jacksonville Florida) (Figure 10)

Figure 10: Application UI: Map view

3. The Setting tab allows to enter the radius as well as the destination address,if travelling. (Figure 11)

Figure 11: Application UI: Settings

7. ConclusionThe project has successfully implemented most of the functionality for a real time traffic alert. The application enables the users to set the radius for scanning and to enter the destination address to avoid any traffic incidents. The project placed much emphasis on performance related to network bandwidth consumption and map API-responsiveness on the GUI, as these are two aspects where mobile devices generally suffer noticeable limitations compared to personal computing. Major weakness of the application is related to security, which has not received much attention during the project's duration, but would of course be a high priority for a real-world

application. Extensive research was not conducted into mobile security and its likely vulnerabilities exist

A future extension of this work can include enhanced security. To access the software a login form can be included to take username and password from the user. Another improvement can be done by developing features to find out nearest hospital, shopping mall, ATM booths and so on. Also, the user can be permitted to switch between map view and satellite view to get user-specific view.

8. REFERENCES[1] Hello, Android: Introducing Google's Mobile

Development Platform (Paperback) by Ed Burnette.[2] Learning Android (Paperback)

by Marko Gargentaing. [3] Programming Android (Paperback)

by Zigurd Mednieks[4] T Professional Android 4 Application Development

(Paperback) by Reto Meier.

[5] Beginning Android 4 Application Development (Paperback) by Wei-Meng Lee.

[6] Android in Action (Paperback) by W. Frank Ableson.

[7] Android Recipes: A Problem-Solution Approach (Paperback) by Dave Smith

[8] Developer.android.com

[9] http://www.mapquestapi.com/traffic