DICLARATION OF ORIGINALITY

ANDROID NAVIGATION SYSTEM

By

WAEL AZHARI ALSIR AHMED

INDEX NO. 084086

Supervisor

Dr. Ghassan Mohammed Taha

A thesis submitted in partial fulfillment for the degree of

B.Sc. (HON)

To the Department of Electrical and Electronic Engineering

(CONTROL ENGINEERING)

Faculty of Engineering

University of Khartoum

July 2013 DICLARATION OF ORIGINALITY

DICLARATION OF ORIGINALITY

I declare that this report entitled “Android Navigation System” is my own work except as cited in the references. The report has not been accepted for any degree and is not being submitted concurrently in candidature for any degree or other award.

Signature : ______

Name : ______

Date : ______

ABSTRACT

ABSTRACT

Android navigation system is application that uses smart phone based on android to figure out the position and direction of the user in any place on the top of earth , This project aims to enable people to have an application that detect their position on a map and this by developing a navigator program . This navigator communicates with the server to get the map desired . the navigator have many functions like loading a map for online navigation mode , also for offline navigation mode , provide a compass to show the user's direction and Track the user location even if online or offline .

The project's aims has been done successfully and the navigator was designed and implemented. The navigator was tested well and the results were good, the detecting of the position and tracking tested well , some limitations were discovered solved well.

المستخلص

المستخلص

َظاو انًالدت انشٔبٕث ْٕ حطبٍق ٌسخخذو انٓاحف انزكً انؼًخًذ ػهى َظاو انخشغٍم أَذسٌٔذ نؼًشفت يٕقغ ٔاحجاِ انًسخخذو فً أي يكاٌ ػهى سطخ األسض . ٌٔٓذف ْزا انًششٔع إنى حًكٍٍ انُاس يٍ ٌكٌٕ نذٌٓا حطبٍق ٌكشف ػٍ يٕقؼٓى ػهى انخشٌطت ٔرنك ػٍ غشٌق ٔظغ بشَايج انًسخكشف .ْزا انًالح ٌخصم يغ خادو نهذصٕل ػهى انخشٌطت انًشجٕة .َظاو انًالدت نّ ٔظائف كثٍشة يثم حذًٍم انخشٌطت ٔ انذصٕل ػهى ٔظغ انًالدت ػهى اإلَخشَج , أٌعا نٕظغ انًالدت غٍش يخصم باالَخشَج ٔ حٕفٍش بٕصهت إلظٓاس احجاِ انًسخخذو ٔحخبغ انًٕقغ انجغشافً نهًسخخذو دخى نٕ كاٌ ػهى احصال باالَخشَج أٔ غٍش يخصم. ٔقذ حى حُفٍز اْاف انًششٔع بُجاح، حى اخخباس انًالح جٍذا ٔكاَج انُخائج جٍذة، ٔقذ حى حذذٌذ انًٕاقغ باسخخذايّ، ٔحخبغ اخخباسِ بشكم جٍذ، حى اكخشاف بؼط انقٍٕد ٔنكٍ دهج بشكم جٍذ .

ACKNOWLEDGEMENT

ACKNOWLEDGEMENT

Unlimited praise for Allah as the number of his creatures, the gratification of himself, the weight of his throne, and the extension of his words.

I would like to present my gratitude and thanks to our supervisor Dr. Ghassan for his unlimited support, motivation, patience.

Finally thanks for my father, mother and sisters ,to my aunt and my uncle and my cousins who encouraged me and supported me all the time, and to all my parent for supporting me .

DEDICATION

DEDICATION

Of course to my Uncle...

TABLE OF CONTENTS

TABLE OF CONTENTS

TITLE DICLARATION OF ORIGINALITY ...... 2 ABSTRACT ...... 3 4 ...... المستخلص ACKNOWLEDGEMENT ...... 5 DEDICATION ...... 6 TABLE OF CONTENTS ...... 7 LIST OF TABLS ...... 10 LIST OF ABBREVIATIONS AND TERMINOLOGIES ...... 11 CHAPTER 1 INTRODUCTION ...... 12 1.1 Introduction ...... 12 1.2 Project Background ...... 12 1.3 Problem statement ...... 13 1.4 Motivation ...... 13 1.5 Project Scope ...... 14 1.6 Thesis layout ...... 14 2 CHAPTER 2 LITREATURE REVIEW ...... 16 2.1 A ...... 16 2.2 Android...... 16 2.3 Applications ...... 17 2.4 History of navigation ...... 18 2.4.1 Types of navigation systems ...... 18 2.4.2 Uses ...... 19 2.5 Mobile phones with GPS capability ...... 20 2.6 Source maps ...... 20 2.6.1 ...... 20 2.6.2 Open Street Map (OSM) ...... 21 2.6.3 Bing Map ...... 22 2.7 tracking ...... 23 TABLE OF CONTENTS

2.8 Advantages and Limitation of Map Sources ...... 24 2.8.1 Google Maps: ...... 24 2.8.2 OpenStreetMap ...... 25 3 CHAPTER 3 DESIGN ...... 27 3.1 Overview: ...... 27 3.2 Design Processes: ...... 27 3.2.1 Identify Requirements (API): ...... 27 3.2.2 Determine Development Tools: ...... 28 Determine Development Technique: ...... 29 3.3 Application Design:...... 29 3.3.1 High-Level Functionalities: ...... 29 3.3.3 Detailed Level Functionalities ...... 33 3.3 Development Phase Difficulties: ...... 39 4 CHAPTER 4 TESTING ...... 41 4.1 Overview ...... 41 4.2 System testing results ...... 41 4.2.1 Test opening the application ...... 41 4.2.2 Test Zoom in and out ...... 42 4.2.3 Test user current location bar button ...... 43 4.2.4 Test lock the map bar button ...... 44 4.2.5 Test Set Start, Destination and Via point ...... 44 4.2.6 Test My Location ...... 45 4.2.7 Test Get Direction ...... 46 4.2.8 Test Search ...... 47 4.2.9 Test the Help ...... 48 4.2.10 Test Settings ...... 49 4.2.11 Test General Settings ...... 50 4.2.12 Test Online\Offline maps ...... 51 4.2.13 Test Online Tiles Source ...... 52 4.2.14 Test Offline Tiles Source ...... 53 4.2.15 Test Screen orientation ...... 53 TABLE OF CONTENTS

4.2.16 Test Full screen ...... 55 4.2.17 Test Keep screen on ...... 56 4.2.18 Test Confirm on Exit ...... 56 4.2.19 Test Tools...... 58 4.2.20 Test Scale Bar ...... 59 4.2.21 Test Mini-Map ...... 60 4.2.22 Test Compass ...... 61 4.2.23 Test GPS Settings ...... 62 4.2.24 Test Min. time to update ...... 63 4.2.25 Test Min. distance to update ...... 64 4.2.26 Test About ...... 66 4.3 System testing summary: ...... 67 5 CHAPTER 5 CONCLUSION AND FUTURE WORK ...... 69 5.1 Project preview ...... 69 5.2 Features ...... 69 5.3 Limitations ...... 70 5.4 Future work ...... 70 6 REFRENCES ...... 71 7 APPENDIX A ...... 1 Source Code ...... 1 8 APPENDIX B ...... 1 Preparing Eclipse for android development ...... 1 9 APPENDIX C ...... 1 STATE DIAGRAMS ...... 1

LIST OF TABLS

LIST OF TABLS

Table 4 -1: open the application test ...... 41 Table 4 -2: Zoom in test ...... 42 Table 4 -3: My Location bar button test ...... 43 Table 4 -4: lock the map bar button test ...... 44 Table 4 -5: Set Start, Destination and Via points test ...... 44 Table 4 -6: My Location test ...... 45 Table 4 -7: Get Direction test...... 46 Table 4 -8: Search test...... 47 Table 4 -9: Help test ...... 48 Table 4 -10: Settings test...... 49 Table 4 -11: General Settings test ...... 50 Table 4 -12: Online\Offline maps test ...... 51 Table 4 -13: Online tiles source test ...... 52 Table 4 -14: Offline tiles source test ...... 53 Table 4 -15: Screen orientation test ...... 54 Table 4 -16: Full screen test ...... 55 Table 4 -17: Keep screen on test ...... 56 Table 4 -18: Confirm on Exit test ...... 56 Table 4 -19: Tools test ...... 58 Table 4 -20: Scale Bar test ...... 59 Table 4 -21: Mini-Map test ...... 60 Table 4 -22: Compass test ...... 61 Table 4 -23 : GPS Settings test ...... 62 Table 4 -24: Min. time to update test ...... 63 Table 4 -25: Min. distance to update test ...... 64 Table 4‎ -26: the final result of all the tests...... 67

LIST OF ABBREVIATIONS AND TERMINOLOGIES

LIST OF ABBREVIATIONS AND TERMINOLOGIES

GSM Global System for Mobile Communications, originally Groupe Spécial Mobile GPS Global position System POI Points of interest

PDA personal digital assistant OS operating systems

APK Android Programing Kit SDK Android development kit

IDE integrated development environment

ADT Android Development Tools

CT Computed Tomography

MRI Magnetic Resonance Imaging

EPO Extended Prediction Orbit

AVD Android Virtual Device

API Android Programing Interface

O.L OnLine

CHAPTER 1 INTRODUCTION

CHAPTER 1 INTRODUCTION

1.1 Introduction

This chapter is intended to give the reader an idea about the project’s problem it solves, background, objectives and scope. besides a thesis layout that informs the reader about the report elements and their description.

1.2 Project Background

Android navigation system is application based on android operating system , and it's attaining of the current position of a mobile phone, stationary or moving. Localization may occur either via multilateral of radio signals between (several) radio towers of the network and the phone, or simply via GPS. To locate the phone using of radio signals, it must emit at least the signal to contact the next nearby antenna tower, but the process does not require an active call. GSM is based on the signal strength to nearby antenna masts.

Mobile positioning, which includes location based service that discloses the actual coordinates of a mobile phone bearer, is a technology used by companies to approximate where a mobile phone, and thereby also its user (bearer), temporarily resides. The more properly applied term locating refers to the purpose rather than a positioning process. Such service is offered as an option of the class of location-based services

Location aware and mapping applications become one of the fascinating topics in both mobile phones and desktop application, but mobile phones have the advantage on this topic over the desktop application that it can easily incorporate the location from global position system (GPS). Telling the user where is he know can help him to know how to go, and whether or he is in the right direction or not.

CHAPTER 1 INTRODUCTION

1.3 Problem statement

As it’s necessary to know where you should go it’s also necessary to know where you are ! and if you lost and ask someone about your place s/he may gives you a wrong answer neither you can imagine the map of this place so you can move, but if you get the map on your phone you will detect your position and tracking you, you can move any direction without getting lost, location mapping applications have gone from a desirable feature to an essential part of any smart phone, because whether the user is checking into his social network, looking for a POI like a pharmacy or a hospital , or located in somewhere and needs help the key is always the same is a location. The main problem that the project is about is to develop and implement application program that detect your position and tracking you till you reach your desired position.

1.4 Motivation People in old days depend on stars to detect their direction but not their position but now a days a navigation systems detect your direction and your position . android operating system is simple and easy learning to implement , there were many application useful for human, the navigation system not just interesting it's important because it gives you a clear position and a options about where you should go also on which suitable way , this application detect your direction and your position .

CHAPTER 1 INTRODUCTION

1.5 Project Scope Project scope is to design an application program that help the users to detect their position and that by :

• Developing and implement software solution for detecting a position and direction .

• Detect and display the user location in the map.

• Allow the user to choose between two modes, online & offline mode.

• Track the user location online or offline.

• Allow the user to choose between several types of maps .

• Provide compass to show the user's direction .

• provide routing pass through more than two points (current position, destination).

1.6 Thesis layout In this section, we present brief information about the rest of this thesis. The remainder part of this thesis is: • Chapter 2 (LITERATURE REVIEW): this chapter gives a brief description of the previous work and research regarding the theories and technologies that are used in the navigation system . • Chapter 3 (design): this chapter presents and describes the methods and developing tools to implement the application . • Chapter 4 (test) is chapter present the snapshots for the application and a clear pictures for any button in the application program. • Chapter 5 (CONCLUSION AND FUTURE WORK): this chapter provides conclusions that describe the completion status and limitations of the system, it also provides the recommended or possible future work. • References : the sources of some data which have been written . • Appendix A: contains the code of the application . CHAPTER 1 INTRODUCTION

• Appendix B: contains Eclipse Soft Ware Program Preparation . • Appendix C: contains the List of POI’S

CHAPTER 2 LITREATURE REVIEW

2 CHAPTER 2 LITREATURE REVIEW

2.1 A smartphone

A smartphone is a mobile phone built on a , with more advanced computing capability and connectivity than a . The first combined the functions of a personal digital assistant (PDA) with a mobile phone. Later models added the functionality of portable media players, low-end compact digital cameras, pocket video cameras, and GPS navigation units to form one multi-use device. Many modern smartphones also include high-resolution touchscreens and web browsers that display standard web pages as well as mobile-optimized sites. High-speed data access is provided by Wi-Fi and mobile broadband. In recent years, the rapid development of markets and of have been drivers of smartphone adoption.

The mobile operating systems (OS) used by modern smartphones include Google's Android, Apple's iOS, Nokia's , RIM's BlackBerry OS, Samsung's Bada, Microsoft's windows Packard's webOS, and embedded Linux distributions such as and MeeGo. Such operating systems can be installed on many different phone models, and typically each device can receive multiple OS software updates over its lifetime. A few other upcoming operating systems are Mozilla's Firefox OS, Canonical Ltd.'s Ubuntu Phone, and .

2.2 Android

Android is a Linux-based designed primarily for touchscreen mobile devices such as smartphones and tablet computers. Initially developed by Android, Inc., which Google backed financially and later bought in 2005 Android was unveiled in 2007 along with the founding of the a consortium of hardware, software, and telecommunication companies devoted to advancing open standards for mobile devices. The first Android-powered phone was sold in October 2008.

Android is open source and Google releases the code under the Apache License. This open source code and permissive licensing allows the software to be freely modified and distributed CHAPTER 2 LITREATURE REVIEW by device manufacturers, carriers and enthusiast developers. Additionally, Android has a large community of developers writing applications ("apps") that extend the functionality of devices, written primarily in a customized version of the Java programming language. In October 2012, there were approximately 700,000 apps available for Android, and the estimated number of applications downloaded from Google Play, Android's primary app store, was 25 billion.

These factors have contributed towards making Android the world's most widely used smartphone platform, and the software of choice for technology companies who require a low- cost, customizable, lightweight operating system for high techdevices without developing one from scratch. As a result, despite being primarily designed for phones and tablets, it has seen additional applications on televisions, games consoles, digital cameras and other electronics. Android's open nature has further encouraged a large community of developers and enthusiasts to use the open source code as a foundation for community-driven projects, which add new features for advanced users or bring Android to devices which were officially released running other operating systems.

Android had a worldwide smartphone market share of 75% during the third quarter of 2012, with 750 million devices activated in total and 1.5 million activations per day. The operating system's success has made it a target for patent litigation as part of the so-called "smartphone wars" between technology companies. As of May 2013, a total of 900 million Android devices have been activated and 48 billion apps have been installed from the Google Play store.

2.3 Applications

Android has a growing selection of third party applications, which can be acquired by users either through an app store such as Google Play or the Appstore, or by downloading and installing the application's APK file from a third-party site. The Play Store application allows users to browse, download and update apps published by Google and third-party developers, and is pre-installed on devices that comply with Google's compatibility requirements. The app filters the list of available applications to those that are compatible with the user's device, and developers may restrict their applications to particular carriers or countries for business reasons. Purchases of unwanted applications can be refunded within 15 minutes of the time of download. and some carriers offer direct carrier billing for Google Play application purchases, where the cost of the application is added to the user's monthly bill. As of September 2012, there CHAPTER 2 LITREATURE REVIEW were more than 675,000 apps available for Android, and the estimated number of applications downloaded from the Play Store was 25 billion.

Applications are developed in the Java language using the Android software development kit (SDK). The SDK includes a comprehensive set of development tools, including a debugger, software libraries, a handset emulator based on QEMU, documentation, sample code, and tutorials. The officially supported integrated development environment (IDE) is Eclipse using the Android Development Tools (ADT) plugin. Other development tools are available, including a Native Development Kit for applications or extensions in C or C++, Google App Inventor, a visual environment for novice programmers, and various cross platform applications frameworks.

In order to work around limitations on reaching Google services due to Internet censorship in the People's Republic of , Android devices sold in the PRC are generally customized to use state approved services instead.

2.4 History of navigation

Navigation is a field of study that focuses on the process of monitoring and controlling the movement of a craft or vehicle from one place to another .The field of navigation includes four general categories: land navigation, marine navigation, aeronautic navigation, and space navigation. It is also the term used for the specialized knowledge used by navigators to perform navigation tasks. All navigational techniques involve locating the navigator's position compared to known locations or patterns.

Navigation, in a broader sense, can refer to any skill or study that involves the determination of position and direction. In this sense, navigation includes orienteering and pedestrian navigation.[ For information about different navigation strategies that people use, visit human navigation.

2.4.1 Types of navigation systems

• Automotive navigation system An automotive navigation system is a navigation system designed for use in automobiles. It typically uses a device to acquire position data to locate the user on a road in the unit's map database.

• Marine navigation system CHAPTER 2 LITREATURE REVIEW

• Global , a group of and computers that can provide information on any person, vessel, or vehicle's location via a GPS receiver

• GPS navigation device, a device that can receive GPS signals for the purpose of determining the device's location and possibly to suggest or give directions

• Surgical navigation system, a system which determines the position of surgical instruments in relation to patient images such as CT or MRI scans. • TomTom NV is a Dutch manufacturer of automotive navigation systems, including both stand-alone units and software for personal digital assistants and mobile telephones. It is the leading manufacturer of navigation systems in Europe. TomTom's customer service is located in Amsterdam, Netherlands. TomTom was a follow-up of Palmtop Software, founded by Peter- Frans in 1991.

2.4.2 Uses  Commercial Navigation

Commercial aviation applications include GPS devices that calculate location and feed that information to large multi-input navigational computers for autopilot, course information and correction displays to the pilots, and course tracking and recording devices.

 Military

Military applications include devices similar to consumer sport products for foot soldiers (commanders and regular soldiers), small vehicles and ships, and devices similar to commercial aviation applications for aircraft and missiles. Examples are the military's Commander's Digital Assistant and the Soldier Digital Assistant.

concern

Due to the popularity of GPS devices, privacy of the user becomes a subject of debate. This is because GPS devices can give geo-location information of the user. This is considered as private information and nobody should violate private information without legal approval. However, there were several incidents where the privacy of GPS devices was questioned. CHAPTER 2 LITREATURE REVIEW

 Advertisement

Since GPS devices can give the user's exact location, this helps advertising agents to give more relevant advertisement to the users based on their current location.[The agencies might promote shops which are nearby to the users, rather than totally irrelevant shops. The advertising agency also will store the user's location for the agency's future uses.

2.5 Mobile phones with GPS capability

Due in part to regulations encouraging mobile phone tracking, the majority of GPS receivers are built into mobile telephones, with varying degrees of coverage and user accessibility. Commercial navigation software is available for most 21st-century smartphones as well as someJava-enabled phones that allows them to use an internal or external GPS receiver (in the latter case, connecting via serial or Bluetooth). Some phones using assisted GPS (A-GPS) function poorly when out of range of their carrier's cell towers. Others can navigate worldwide with satellite GPS signals as well as a dedicated portable GPS receiver does, upgrading their operation to A-GPS mode when in range. Still others have a hybrid positioning system that can use other signals when GPS signals are inadequate.

Many Android smartphones have an additional GPS feature, called EPO (Extended Prediction Orbit). The phone downloads a file to help it locate GPS satellites more quickly and reduce the Time To First Fix.

2.6 Source maps

2.6.1 Google Maps

Google Maps (formerly Google Local) is a web mapping service application and technology provided by Google, that powers many map-based services, including the Google Maps website, Google Ride Finder, Google Transit, and maps embedded on third-party websites via the Google Maps API. It offers street maps, a route planner for traveling by foot, car, bike (beta), or with public transportation and a locator for urban businesses in numerous countries around the world. Google Maps satellite images are not updated in real time, but rather they are several months or years old. CHAPTER 2 LITREATURE REVIEW

Google Maps uses a close variant of the Mercator projection, so it cannot show areas around the poles. A related product is Google Earth, a stand-alone program which offers more globe- viewing features, including showing polar areas.

Figure bellow show an example for Google map :-

Figure 2‎ -1 example for Google map

2.6.2 Open Street Map (OSM) is a collaborative project to create a free editable map of the world. Two major driving forces behind the establishment and growth of OSM have been restrictions on use or availability of map information across much of the world and the advent of inexpensive portable devices.

Created by Steve Coast in the UK in 2004, it was inspired by the success of Wikipedia and preponderance of proprietary map data in the UK and elsewhere Since then, it has grown to around three hundred thousand contributors,[6] who collect data using GPS devices, aerial photography, and other free sources. This crowd sourced data is then made available under the Open Database License. The site is supported by the Open Street Map Foundation, a non- profit organization registered in England. CHAPTER 2 LITREATURE REVIEW

Rather than the map itself, the data generated by the Open Street Map project is considered its primary output. This data is then available for use in both traditional applications, like its usage by Craigslist, Geocaching.com, MapQuest Open, and Foursquare to replace Google Maps, and more unusual roles, like replacing default data included with GPS receivers. These data have been favorably compared with proprietary data sources, though data quality varies worldwide.

Figure below show an example for Google map

Figure 2‎ -2 example for Google map

2.6.3 Bing Map

Bing Maps previously known as Windows Live Local , Windows Live Maps , Virtual Earth and Live Search Maps - owned by Microsoft internet service with road maps and satellite imagery and air , which is part of the search engine Bing .

The website is regularly updated with new data.

You can add your own information to the maps (points, lines and polygons) and then share them with other users of the service. Bing Maps also provides a special API that allows other developers to create their own web applications using maps and information from the site.

Figure bellow shows an example for Bing map :- CHAPTER 2 LITREATURE REVIEW

Figure 2‎ -3 example for Bing map

2.7 Mobile phone tracking

Mobile phone tracking refers to the attaining of the current position of a mobile phone, stationary or moving. Localization may occur either via multilateral of radio signals between (several) radio towers of the network and the phone, or simply via GPS. To locate the phone using multilateration of radio signals, it must emit at least the roaming signal to contact the next nearby antenna tower, but the process does not require an active call. GSM is based on the signal strength to nearby antenna masts. CHAPTER 2 LITREATURE REVIEW

Mobile positioning, which includes location based service that discloses the actual coordinates of a mobile phone bearer, is a technology used by telecommunication companies to approximate where a mobile phone, and thereby also its user , temporarily resides. The more properly applied term locating refers to the purpose rather than a positioning process. Such service is offered as an option of the class of location-based services

2.8 Advantages and Limitation of Map Sources

2.8.1 Google Maps: Map Views

• One of the biggest advantages of Google maps is the three different map views it supplies. There is a normal map view, a satellite image view and a terrain view, depending on the need of the user.

Multiple Destinations

• Another advantage is that if the user needs directions that include numerous stops, Google maps easily adds a new destination to the route with a single click.

Simplicity

• The simplicity of Google maps is an often overlooked advantage. The website is very cut and dry. It does what it needs to do without confusing the user with unnecessary bells and whistles.

Travel Type

• One last advantage to the website is the ability to select the type of travel you will be using when getting directions. The user can select if she is traveling by car, public transportation or even walking.

The Zoom Feature

• The one disadvantage with Google maps is its zoom feature. The map seems to zoom to the center of the map screen, causing the user to constantly move the map when zooming in.

Limitations : CHAPTER 2 LITREATURE REVIEW

 Invades privacy  Every street is not captured, so you might have trouble locating an address.  Captures embarrassing moments, or illegal actions.  Sometimes the information is not quite up to date.  The zoom feature.

2.8.2 OpenStreetMap

Advantages :

 OSM is community-generated. Users gather location data and then information is added to the central database where it can then be further modified, corrected, and enriched by anyone who notices missing facts or errors about the area.  Local community members can enhance the existing functionality of maps of their area by adding detailed information and changes. This increases the likelihood that a map will be more useful than an outdated one produced by a commercial vendor.  Map data can be edited to “to quickly accommodate changes in the physical world.” For example, following the January 2010 earthquake in Haiti, volunteer teams from around the world worked to update changes to the map due to the physical devastation. These more accurate maps of the affected areas helped responders on the ground reach those in need.  The dedicated volunteer users are working on a variety of mapping applications and improvements are being made daily.  No technical or legal restrictions.  Maps can be easily customized to fit your needs (although you do need some technical know-how to fully take advantage of this function).

Limitations :

 there is no guarantee of accuracy of any kind.” This puts more responsibility on you, the user of the map, to verify the accuracy of the map. But since you can edit any map, you can also help improve its accuracy. CHAPTER 2 LITREATURE REVIEW

 Users need to be somewhat technically-savvy to get the most out of OSM and to edit maps.  OSM is a work in progress, so it may not have the detailed map you are looking for yet.

CHAPTER 3 DESIGN

3 CHAPTER 3 DESIGN

3.1 Overview: In this chapter, the navigator design and implementation will be presented. The design illustrated using a flow chart to give a clear vision for the application implementation.

3.2 Design Processes: This application program is designed and accomplished step by step which we use an agile method to complete the application , this application processed using an API called Osm droid to perform the whole part of the application and the steps is :

3.2.1 Identify Requirements (API): The first phase of the project (information gathering and analysis) was basically about studying the various APIs available in the internet, the various functionality provided by the API, and their different merits.

There are so many mapping APIs available each of them belongs and access a particular server, some of them for indoor mapping and others for outdoor mapping, the most famous and API is Google mapping API, there are many other mapping API like map Quest , Arc GIS, Google map and osmdroid , we studied the merits of each and even test some of them displaying a map usingit, Google maps API Google has the advantage that it is well documented, and easy to use, but we didn't use it because for free license the application must be free and publicly available, also the number of requests per day is limited, also we couldn't grantee that if we edit the maps in their server.But Osmdroid mapping API It is free, and does not even require a mapping API key, and it accesses OpenStreetMaps which is a collaborative project to create a free editable map of the world, for this two reasons we had chosen it, also it allow the developer to change the server of the maps, and it can be used with other API to provide routing service, and so many other features.

CHAPTER 3 DESIGN

3.2.2 Determine Development Tools: Here is the tools used to construct the application

Eclipse IDE:

Eclipse java Integrated development environment (IDE) It is an integrated development environment for java, with a code editor, java compiler, debugger, and other development helping features, it also can be extended by android development toolkit (ADT) to allow android development

Eclipse IDE was selected to develop the application, which is the most famous IDE for Android application development. Installing and preparing Eclipse is illustrated in Appendix B.

Android development toolkit (ADT):

Android software development is the process by which new applications are created for the Android operating system. Applications are usually developed in the Java programming language using the Android Software Development Kit,

Android software development kit (SDK):

The Android software development kit (SDK) includes a comprehensive set of development tools. These include a debugger, libraries, a handset emulator enabling to create android virtual devices (AVD) for testing. Samsung Galaxy W (Wonder) I8150:

This device is running Android 2.3.6 version as the operating system. The device was used for testing the application .

Mobile atlas creator:

Mobile Atlas Creator (formerly known as TrekBuddy Atlas Creator) is an open source program which creates offline atlases for GPS handhelds and cell phone applications like TrekBuddy, AndNav and other Android and WindowsCE based applications. CHAPTER 3 DESIGN

Determine Development Technique: We have used the technique the construct the application starting from rendering the map with suitable server using suitable map creator till constructing the other feature and other option that appear in the application and testing the application in every single addition in the application .

3.3 Application Design: We divide the design of the application into two division as their function .

Functionalities are decomposed and described within two levels:

1. High-level functionalities.

2. Detailed-level functionalities.

High-level functionalities describes the main behavior of the application Starting from opening the application, displaying online or offline map view, main procedures and actions to navigate through the application’s activities and options.

Detailed-level functionalities in the other hand, describes the detailed roles for each component of the application, how to use it and the actions related to it.

3.3.1 High-Level Functionalities: After installing the application on the targeted smart phone running one of the versions of android OS, the icon appears on the screen along with the other application icons, click on the icon will open the application.

As shown below in Figure 3-1: “The main behavior and functionalities of the application", opening the application leads to the Splash screen, after two seconds delay, the main online “or offline” map view is rendered from the server “or SD card” and displayed on the screen, the application at this point is opened an waiting for the user to perform actions.

CHAPTER 3 DESIGN

Figure 3‎ -1The basic functionalities illustrated in more details

CHAPTER 3 DESIGN

The basic functionalities illustrated by Figure 3-1 are described in more details as following

Splash Screen:

The first action performed after opening the application is displaying the Splash screen. It’s basically displays the logo of appname on the screen for two seconds, after that the application terminates the Splash activity class and calls the online map activity class “or offline map activity class”. This class was created as a good android development practice used in many of today’s android applications.

GPS Alert Dialog:

It’s used to perform GPS availability test. After the two seconds of the Splash screen terminates, the Main online “or offline” activity starts. Before displaying the main map, GPS check is performed. If the GPS of the system is already enabled, the main activity will be displayed normally, but if GPS is disabled, GPS Alert dialog will be displayed. It basically notify the user that system’s GPS is disabled and asks him whether he wants to enable it or just to do nothing.

Online map activity

It’s the main activity that shows the online map which downloaded from the server , it appear after two seconds after opening the application , it contains compass, scale bar , mini map and user location . Offline map activity

It’s the activity that shows the offline map stored in the memory of the phone which downloaded from the server previously and it contains also compass, scale bar , mini map and user location . Option menu

By pressing option button six options will appear in a small screen this screen contain My location, Get Direction , Search POI’s , Lists , Setting , Help . My location

When we choose this option it use the GPS to detect user current location and show it on the map and tracking the user location it can only show user current location outdoor , then it track CHAPTER 3 DESIGN the user location on the map and show the location on the center of the map , this option have a button of the bar on the map view .

Get Direction

This option shows a dialog to enter the source and destination point also to the method of routing if by bicycle , a car or on foot , also you can use this feature to go to your destination via points (1,2,..) ,the source point maybe the current user position or any point you enter , you can use this feature by press along on the map view and enter your points and determine the method of routing . Search POI’s

This option gives you a dialog to determine the points of interest you need , at the dialog there are a list of type of POI’s you can choose one of them and it will appear on the map directly or you can enter the POI’s you need. When you use the Routing and use Search the Search for POI’s appear it will be along the Rout . Settings

When we choose this option a another activity will appear and it contain a list of options and these options are: General Settings, Tools, GPS Settings ,Cache Settings and About , every option of those have a sub options appear by choosing any option of them . Help

It have an information about the application and how to use the application also if you have a problem in using any part of the application , also it gives you application name , manufacturers and small details about the application . Exit Confirmation

When we press back button on the map activity a dialog will appear to confirm the exit out of the application , we can start and stop this feature by checking the Confirm on Exit on screen Setting in the Setting .

CHAPTER 3 DESIGN

3.3.2 Detailed Level Functionalities We describe the Functionalities with more details and divided the Functionalities into four parts :

1. Map View Activity Functionalities.

2. Overlays Functionalities .

3. Root Calculation Functionality.

4. Settings Functionality

Each of these categories describes its related components, functions of each component and the flow of behavior described by flowcharts.

One of the most important considerations along the development process is the high level of details. It was intended to make the application more reliable and ready as much as possible to be used like any other professional application. But for the sake of simplicity, much of the details will be ignored during the design illustration.

MapView Activity functionalities:

This aactivity have two part one of them is rendering the map from the server for any map we need , the other is rendering the map that pre-saved in the memory for offline using. Here we illustrate the functionality for each other. The Map View Activity contains other buttons to perform specific processes like buttons of Get My Direction, Compass .

Here is Online Map Functionality:

Render and Display Map Tiles:

The Map Activity contains top bar that contains buttons perform specific function as Get My Direction , Compass and My Location.

And the bottom view show the default map that appear every time we enter the application and the default comes from the last map that we used when we close the application , after entering the application we can choose the Map we need from the setting. CHAPTER 3 DESIGN

Track user current location:

Tracking user current location performed by using GPS to detect the location of the user and show the current location on our map with the direction of moving by a small red arrow right to the north. When the user move the GPS tracing them and send the new location to the application and show it on the map.

Displays Overlays over the Map View:

The overlays here have top Bar bottom, it’s function to make the using of some features easy and reliability , top part contains four buttons we illustrate it as follow contains four buttons My Location, Lock Screen and Application name and logo as :

1. My Location Button: It used to detect the user current location and to tracking ten user ,this functionality is already exist on the Option Menu but we show it here to make the application more convenient for the user ,

2. Lock Screen: locks the zoom and lock the map when the user move the screen on land scape mode also when the user moving until the user unlock the map again.

3. Application name and logo: displays the application name and logo.

Overlays Functionalities:

This overlays is on the top Bar of the Map and it’s functionality is to make the application more reliability and for ease of use , here we have the icons o them illustrated well as follows :

User current location icon:

It displays the current location of the user on the map using GPS to detect the user current location and show it on the map , also in moving the GPS alert the application to change the user location by sending the current location. With the direction of move.

CHAPTER 3 DESIGN

Start Point icon:

This icon used to determine the user starting point when the user intend to use routing method between two or three points by clicking this icon the start point will appear for routing ,also the start point can be the user current position .

Destination Point icon:

This icon for determine the point that the user intent to reach it , by clicking this icon the address of the destination will be save as destination point for routing technique, the destination point will appear on the map with the suitable way for routing and reaching that address .

Via-Point icon:

This icon for determine the point or points that the user need to cross it and to reach the destination point , a multiple points can be determined as we need for using routing technique , the Via-Points appear on the map , it’s sets by clicking the Via-Point icon .

Compass:

It’s functionality is to determine the user current direction even though the user is stable or moving, the Compass appear in the top left corner of the map .

Mini-Map:

This Mini-Map used for giving the user a clear view of the map that we have been rendered early , this Mini-Map is like the map but the difference is the Mini-Map is one degree of zoom out ,so the user can take a clear view for the map , the position of the Mini-Map is on the bottom right of the map .

Scale bar:

This Scale Bar is used to indicate the zooming degree when we using the zooming feature also shows it by kilometers , the position of Scale Bar is right over Mini-Map.

CHAPTER 3 DESIGN

Points of interest (POIs):

Points of interest are already located on the map that we rendering so when we need to render a map we must to have a network connection , Points of interest are listed and categories as medical , sustains and so on , Points of interest are most useful feature because it determine the location of human needs simply and fast , also we can use a Search method for finding POI’s .

Lists of the POIs available on the application are listed in Appendix C.

Route calculation functionality:

This technique is most useful feature it determine the user start point and destination and construct the way for routing with suitable way until the user reach the destination point. This technique need the user to be online to perform the routing because the calculation is done online and this is called online routing ,To calculate the route between two points on map, Get Direction button on the options menu is used. The following procedures are used to get route between two points.

Choose Start, Destination and Via- points:

A three options appear on the map when we pressed along on it , this option is illustrated well as follows :

1. Set Destination Point: this feature is useful facility for the user and usage of this feature make the application more convenience , first we marks the point by clicking the destination icon. Then it opens the Get Direction Dialog appear shows three modes of routing :Car Mode , Bicycle Mode and on foot (Pedestrian Mode) .

2. Set Start Point: by clicking a Set Start Point icon the start point determined the current user position is set as default point, we can change the start point by clicking on the desired point for starting.

3. Set Via-Point This icon for determine the point or points that the user need to cross it and after that to reach the destination point.

CHAPTER 3 DESIGN

Determine route calculation method:

1. As we mentioned earlier when we pressed a Set Destination Point a Get Direction Dialog appear shows three modes of routing :Car Mode , Bicycle Mode and on foot (Pedestrian Mode) this modes illustrated well as follows:

1. Car Mode: Assumes that the user is using a car for transportation. It differ from the other modes by avoiding the sub-ways and un reachable ways when we use a car or other engine .

2. Bicycle Mode: Assumes that the user is using a bicycle for transportation. This method shows the main and sub streets which can be reached .

3. Pedestrian Mode: Assumes that the user is travelling on foot. This method is shows any streets the user can use it for reaching the destination point in small time .

After setting all of this the route way appear on the map by clicking “show route”

With appropriate street as we set .

Settings Functionalities:

Settings Activity is the main control Activity because it set the whole behavior and the main control part of the application , it consist of General Settings ,Tools ,GPS Settings and Cache Settings . The main part of Settings Activity illustrated well as follow :

General Settings:

General Settings contains the general functionalities of the application. It’s divided into three groups:

1. Map Source Settings: it control the online and offline map view and sources :

a. Online/Offline Maps: consist of the “Online tiles” let the main activity to be on the online map activity mode. The “Offline tiles” let the main activity to be on the offline activity mode. CHAPTER 3 DESIGN

b. Online tiles source: to determine the source that we need to render our map from by connecting over the network and choose a specific online map source along several listed sources.

List of OSM Map tile sources are illustrated in Appendix C.

c. Offline tiles source: used to choose the source of offline map like Mapnik and Google map which will be store on a memory for re using it in offline mode .

d. Download map tiles: for downloading map tiles and save it on the memory to use it .

2. Screen Settings: consist an options for setting the screen for more appropriation and convenience for the user and it contains :

a. Screen orientation: consist of three options: Portrait, Land space and both.

b. Full screen: showing map with full view without a bar and notifications .

c. Keep screen on: it prevents the screen from getting sleep and we don’t need to touch the screen every time to see the Activities .

d. Confirm on Exit: when we exit the application a small dialog appear with option to confirm the exit .

Tools:

This category consists of the features that give additional functionalities to the application. Three tools are presented as follow:

1. Compass: It’s functionality is to determine the user current direction .

2. Mini-Map: used for giving the user a clear view of the map that we have been rendered early .

3. Scale Bar: This Scale Bar is used to indicate the zooming degree and it will appears on the top of Mini -Map. CHAPTER 3 DESIGN

GPS Settings

When we start the application and we need to detect our location GPS do this feature and there is a lot usage of GPS in this application like when we need to use Routing technique we must first determine our location also when we move and we need to use Get My Location feature GPS follow our location and show it on the map, GPS Settings is used to control the usage of the GPS so we can reduce the power consumption .

Two settings are presented in this category as follow:

1. Min. time to update: it control the tracing and updating user current location to show it on the map by setting a minimum time to update the tracing location and the time is in second , it save more power by setting a big number .

2. Min. distance to update: it control the tracing and updating user current location to show it on the map by setting a minimum distance that the user moves after the specific distance GPS can send the new user location so it can appear on the map, this distance measured by a kilometers .

Cache Settings:

When we rendering online map from the server the map tiles will be saved on the memory for using this map stay on the memory after we finish and close the application , this map tiles take a space on the memory as we know every memory have storage capacity so we must clear the memory so we can find a new space for the new map tiles , Clear Cache is clear the data and tiles from a memory .

3.4 Development Phase Difficulties: The development phase of android application has its complexities, specially the development of this application. There are some difficulties occurred during the development process, these difficulties can illustrated as follow:

1. There are no good tutorials to explain the use of Osmdroid API’s classes and methods. The information gathering was done along the development process by searching for a solution for each problem individually. The main source of information was the previous questions of CHAPTER 3 DESIGN

developers and the corresponding answers. Even the solution found can be not enough to solve a particular problem and a lot of experiments must be done to find this solution.

2. Lack of resources leads to waste of time over solving the small problems that can affect the whole application.

3. Run time errors can be very hard to detect. Specially, when the application’s structure becomes more complex.

4. Some solutions founded online can be wrong and waste time to try using it.

CHAPTER 4 TESTING

4 CHAPTER 4 TESTING

4.1 Overview This chapter shows the system test for the application and the results, all the tests are performed using android emulator.

4.2 System testing results This testing is applied to every single feature in the application in every stage of the implementations , the system test show if the applications has a limitations or pass all the test correctly , at the beginning of the system test there were a limitations but it were solved well and modified and the application came out passing all the tests .

4.2.1 Test opening the application The test is performed using the steps specified in Table 4 -1: “open the application test" and the result is the screen shown in Figure 4 -1: “GPS Alert dialog"

Table 4 -1: open the application test

Steps Expected result Actual result Open the application The application opens, Splash pass screen is displayed, GPS Alert dialog is displayed if GPS is off, then map is loaded from the server

CHAPTER 4 TESTING

Figure 4 -1: GPS Alert dialog The result was as expected, the application displays the splash screen showing the application’s logo for two seconds. GPS Alert test is performed after splash screen disappears, GPS Alert dialog will be displayed if GPS is disabled, showing options: Enable GPS & Do nothing. Both buttons are tested and passed. After that the application displays online map screen, showing the bar buttons containing Current user location, Lock the map application’s logo and name.

4.2.2 Test Zoom in and out The test is performed using the steps specified in Table 4 -2: “Zoom in test in and out"..

Table 4 -2: Zoom in test

Steps Expected result Actual result Open the application The application is opened, pass splash screen is displayed & online map is loaded from server Choose Zoom in or Zoom out Map is zoomed in or out pass buttons The result was as expected, map is zoomed in or zoomed out, depends on the button pressed. CHAPTER 4 TESTING

4.2.3 Test user current location bar button The test is performed using the steps specified in Table 4 -3: “My Location bar button test" and the result is the screen shown in Figure 4 -2: "user current location"

Table 4 -3: My Location bar button test Steps Expected result Actual result Open the application The application is opened, pass splash screen is displayed & online map is loaded from server Choose User Current location shows the user current pass location

Figure 4 -2: My Location bar button test The result was as expected, the user current location is displayed on the map.

CHAPTER 4 TESTING

4.2.4 Test lock the map bar button The test is performed using the steps specified in Table 4 -4: “lock the map bar button test".

Table 4 -4: lock the map bar button test Steps Expected result Actual result Open the application The application is opened, pass splash screen is displayed & online map is loaded from server Check Lock the map bar Lock icon is changed to lock pass button state and map is locked

The result was as expected, the application locks the controls (moving and zooming) of the map.

4.2.5 Test Set Start, Destination and Via point The test is performed using the steps specified in Table 4 -5: “Set Start, Destination and via point test" and the result is the screen shown in Figure 4 -3: "Start, destination and multiple via point icons"

Table 4 -5: Set Start, Destination and Via points test

Steps Expected result Actual result Open the application The application is opened, pass splash screen is displayed & online map is loaded from server Perform long press on map Start, Destination and Via pass and choose Set Start, point icons are displayed on Destination and via point map & Get Direction dialog is displayed

CHAPTER 4 TESTING

Figure 4 -3: Start, destination and multiple via point icons The result was as expected, Start, Destination and Via point icons are displayed on map at the specified point & Get Direction dialog is displayed as response for setting destination point, showing start and destination point types and the routing methods (car, bicycle & pedestrian). Clicking the icon displays a balloon determining the address.

4.2.6 Test My Location The test is performed using the steps specified in Table 4 -6: “My Location test" and the result is the screen shown in Figure 4 -4: "user current location"

Table 4 -6: My Location test

Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Option menu is displayed pass Choose My Location show the user current location pass

CHAPTER 4 TESTING

Figure 4 -4: My Location test The result was as expected, the user current location is displayed on the map.

4.2.7 Test Get Direction The test is performed using the steps specified in Table 4 -7: “Get Direction test" and the result is the screen shown in Figure 4 -5: "Get Direction dialog"

Table 4 -7: Get Direction test Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Option menu is displayed pass Choose Get Direction Get Direction dialog is pass displayed Specify mode and Press show The route is rendered from pass route server according to mode selected and displayed on map CHAPTER 4 TESTING

Figure 4 -5: Get Direction test The result was as expected, Destination icon is displayed on map at the specified point & Get Direction dialog is displayed, showing start and destination point types and the routing methods (car, bicycle & pedestrian). “Show route” button renders the route from server and displays it according to the mode selected.

4.2.8 Test Search The test is performed using the steps specified in Table 4 -8: “Search test" and the results are the screen shown in Figure 4-6 : “Fuel POIs on map screen”

Table 4 -8: Search test Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Option menu is displayed pass Choose Search Search dialog is displayed pass Search for POI POI related to the current pass view or route are displayed CHAPTER 4 TESTING

Figure 4 -6:Search test The result was as expected, Search dialog is displayed. Specifying POI and clicking search displays the specified POIs related to the current view or route.

4.2.9 Test the Help The test is performed using the steps specified in Table 4 -9: “Help test".

Table 4 -9: Help test

Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Help Help for using the application pass is displayed The result was as expected, help instructions about using the application is displayed. CHAPTER 4 TESTING

4.2.10 Test Settings The test is performed using the steps specified in Table 4 -10: “Settings test" and the result is the screen shown in Figure 4 -7: "Settings screen"

Table 4 -10: Settings test Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Figure 4 -7: Settings test The result was as expected, the Settings screen is displayed with option: General Settings, Tools, GPS Settings and About. CHAPTER 4 TESTING

4.2.11 Test General Settings The test is performed using the steps specified in Table 4 -11: “General Settings test" and the result is the screen shown in Figure 4 -8: "General Settings screen"

Table 4 -11: General Settings test Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose General Settings General Settings screen is pass displayed

Figure 4 -8: General Settings test CHAPTER 4 TESTING

The result was as expected the General Settings screen is displayed with option, Online\Offline maps, Online tiles source , Offline tiles source, Screen orientation, Full screen, Keep screen on, and Confirm on Exit.

4.2.12 Test Online\Offline maps The test is performed using the steps specified in Table 4 -12: “Online\Offline maps test" and the result is the screen shown in Figure 4 -9: "Online\Offline maps screen"

Table 4 -12: Online\Offline maps test

Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose General Settings General Settings screen is pass displayed Choose Online\Offline maps Online tiles and offline tiles pass options are displayed Choose Online tiles or offline Map tiles are rendered from tiles server for online tiles option, and rendered from storage for offline tiles option

CHAPTER 4 TESTING

Figure 4 -9: Online\Offline maps test The result was as expected, the Online\Offline maps list is displayed with options: Online tiles that toggles the map view to render map tiles from server, and Offline tiles that renders tiles from SDcard ot external storage.

4.2.13 Test Online Tiles Source The test is performed using the steps specified in Table 4 -13: “Online tiles source test".

Table 4 -13: Online tiles source test

Steps Expected result Actual result open the application The application is opened, splash pass screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose General Settings General Settings screen is displayed pass Choose Online tiles source Online map servers are pass displayed CHAPTER 4 TESTING

The result was as expected, Online tiles source list is displayed. Each of these options changes the online tiles source.

4.2.14 Test Offline Tiles Source The test is performed using the steps specified in Table 4 -14: “Offline tiles source test".

Table 4 -14: Offline tiles source test

Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose General Settings General Settings screen is pass displayed Choose Offline tiles source Offline map servers are pass displayed

The result was as expected the Offline tiles source screen is displayed with two options: Mapnik, Google Maps.

4.2.15 Test Screen orientation The test is performed using the steps specified in Table 4 -15: “Screen orientation test" and the result is the screen shown in Figure 4 -10: “Screen orientation using Landspace option”

CHAPTER 4 TESTING

Table 4 -15: Screen orientation test

Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose General Settings General Settings screen is pass displayed Choose Screen orientation Screen orientation list is pass displayed Select Portrait, Landspace or The screen orientation of the pass Device orientation map screen is fixed to the selected option

Figure 4 -10: Test Screen Orientation CHAPTER 4 TESTING

The result was as expected, Screen orientation list is displayed with options: Portrait, Landspace and Device orientation. The screen orientation of the map screen is fixed to the selected option.

4.2.16 Test Full screen The test is performed using the steps specified in Table 4 -16: “Full screen test" and the result is the screen shown in Figure 4 -11: “Full screen applied”

Table 4 -16: Full screen test Steps Expected result Actual result open the application The application is opened, splash pass screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose General Settings General Settings screen is displayed pass Check Full screen Full screen is checked and pass notification bar is hidden

Figure 4 -11: Full screen test CHAPTER 4 TESTING

The result was as expected, Full screen is checked and notification bar of both settings and the map screen are hidden. The application then fills the screen.

4.2.17 Test Keep screen on The test is performed using the steps specified in Table 4 -17: “Keep screen on test".

Table 4 -17: Keep screen on test

Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose General Settings General Settings screen is pass displayed Check Keep screen on Keep screen on is checked pass and screen remains on The result was as expected, Keep screen on is checked and the lock screen and dim screen are disabled.

4.2.18 Test Confirm on Exit The test is performed using the steps specified in Table 4 -18: “Confirm on Exit test" and the result is the screen shown in Figure 4 -12: “Exit confirmation dialog applied”

Table 4 -18: Confirm on Exit test

Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server CHAPTER 4 TESTING

Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose General Settings General Settings screen is pass displayed Check Confirm on Exit Confirm on Exit is checked pass and Exit confirmation dialog is checked when exiting the application

Figure 4 -12: Confirm on Exit test The result was as expected, Confirm on Exit is checked and the exit confirmation dialog is displayed when trying exiting the application. This ensures the users verification to exit the application.

CHAPTER 4 TESTING

4.2.19 Test Tools The test is performed using the steps specified in Table 4 -19: “Tools test" and the result is the screen shown in Figure 4 -13: "Tools screen"

Table 4 -19: Tools test Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose Tools Tools screen is displayed pass

Figure 4 -13: Tools test The result was as expected, the Tools screen is displayed with options: Scale Bar, Mini Map , Compass and other options . CHAPTER 4 TESTING

4.2.20 Test Scale Bar The test is performed using the steps specified in Table 4 -20: “Scale Bar test" and the result is the screen shown in Figure 4 -14: “Scale Bar displayed on map”

Table 4 -20: Scale Bar test Steps Expected result Actual result open the application The application is opened, splash screen is pass displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose Tools Tools screen is displayed pass Choose Scale Bar Scale Bar is checked and displayed on map pass

Figure 4 -14: Scale Bar test The result was as expected, the Scale Bar is checked and the scale bar is displayed on the map. CHAPTER 4 TESTING

4.2.21 Test Mini-Map The test is performed using the steps specified in Table 4 -21: “Mini-Map test" and the result is the screen shown in Figure 4 -15: “Mini-Map displayed on map”

Table 4 -21: Mini-Map test Steps Expected result Actual result open the application The application is opened, splash pass screen is displayed & online map is loaded from server

Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose Tools Tools screen is displayed pass Choose Mini-Map Mini-Map is checked and displayed pass on map

Figure 4 -15: Mini-Map test CHAPTER 4 TESTING

The result was as expected, the Mini-Map is checked, a small map on the bottom-right of the screen shows a mini-map of the same main map tiles source.

4.2.22 Test Compass The test is performed using the steps specified in Table 4 -22: “Compass test" and the result was the screen shown in Figure 4 -16: “Compass displayed on map”

Table 4 -22: Compass test Steps Expected result Actual result open the application The application is installed and splash & pass online map screen is displayed Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose Tools Tools screen is displayed pass Choose Compass Compass is checked and displayed on pass map

Figure 4 -16: Compass test CHAPTER 4 TESTING

The result was as expected the Compass is checked, a compass is displayed on the top left of the map, the red arrow points to the North.

4.2.23 Test GPS Settings The test is performed using the steps specified in Table 4 -23: “GPS Settings test" and the result is the screen shown in Figure 4 -17: "GPS Settings screen"

Table 4 -23 : GPS Settings test Steps Expected result Actual result open the application The application is opened, splash pass screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose GPS Settings GPS Settings screen is displayed pass

Figure 4 -17: GPS Settings test CHAPTER 4 TESTING

The result was as expected, GPS Settings screen is displayed with option: min. time to update and min. distance to update.

4.2.24 Test Min. time to update The test is performed using the steps specified in Table 4 -24: “Min. time to update test" and the result is the screen shown in Figure 4 -18: “Min. time to update dialog”

Table 4 -24: Min. time to update test Steps Expected result Actual result open the application The application is opened, splash screen is displayed & pass online map is loaded from server

Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose GPS Settings GPS Settings screen is displayed pass Choose min. time to min. time to update dialog is displayed pass update Choose value in GPS minimum time to update location is updated with pass seconds and press OK the specified value.

CHAPTER 4 TESTING

Figure 4 -18: Min. time to update test The result was as expected, the min. time to update dialog is displayed, and GPS minimum time to update location is updated with the specified value. The specified value will determine how much GPS will work and consumes battery power. Increasing the value (number of seconds) will increase the efficiency of battery power consumption.

4.2.25 Test Min. distance to update The test is performed using the steps specified in Table 4 -25: “Min. distance to update test" and the result is the screen shown in Figure 4 -19: “Min. distance to update dialog”

Table 4 -25: Min. distance to update test Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

CHAPTER 4 TESTING

Choose Settings Settings screen is displayed pass

Choose GPS Settings GPS Settings screen is pass displayed Choose min. time to update min. time to update dialog is pass displayed Choose value in meters and GPS minimum distance to pass press OK update location is updated with the specified value.

Figure 4 -19: Min. distance to update test The result was as expected, the min. distance to update dialog is displayed, and GPS minimum distance to update location is updated with the specified value.

CHAPTER 4 TESTING

4.2.26 Test About The test is performed using the steps specified in Table 4 -34: “About test" and the result is the screen shown in Figure 4 -34: “About dialog showing the application’s information”

Table 4 -27: About test

Steps Expected result Actual result open the application The application is opened, pass splash screen is displayed & online map is loaded from server Press menu button Options are displayed pass

Choose Settings Settings screen is displayed pass

Choose About About dialog is displayed pass

The result was as expected, About dialog is displayed containing the information about the application.

CHAPTER 4 TESTING

4.3 System testing summary: The Table 4-26: “test summery" show the final result of all the tests performed in the final system test, giving the test pass (Pass) if all the expected results in each step of the test is successfully passes, and fail (Fail) if the test completely fail.

Table 4‎ -26: the final result of all the tests Test No. Final result Test 1 Pass Test 2 Pass Test 3 Pass Test 4 Pass Test 5 Pass Test 6 Pass Test 7 Pass Test 8 Pass Test 9 Pass Test 10 Pass Test 11 Pass Test 12 Pass Test 13 Pass Test 14 Pass Test 15 Pass Test 16 Pass Test 17 Pass Test 18 Pass Test 19 Pass Test 20 Pass Test 21 Pass Test 22 Pass Test 23 Pass CHAPTER 4 TESTING

Test 24 Pass Test 25 Pass Test 26 Pass

All tests are passed successfully. The two main factors helped to achieve this success are:

1. Any development and addition of any functionality was tested and verified to function correctly before proceeding to the next functionality development. These verifications were ensured by unit tests and integration tests. 2. The availability of the Samsung Galaxy W device running android 2.3.6. It’s a physical environment that gives real results for any type test cases, using the emulator may have limitations on some test cases.

CHAPTER 5 CONCLUSION AND FUTURE WORK

5 CHAPTER 5 CONCLUSION AND FUTURE WORK

5.1 Project preview The main problem that the project is about is to develop and implement application program that detect your position and tracking you till you reach your desired position. and if you lost and ask someone about your place s/he may gives you a wrong answer neither you can imagine the map of this place so you can move, but if you get the map on your phone you will detect your position and tracking you, you can move any direction without getting lost, location mapping applications have gone from a desirable feature to an essential part of any smart phone, because whether the user is checking into his social network, looking for a POI like a pharmacy or a hospital , or located in somewhere and needs help the key is always the same is a location. The scope of the project was to develop and implement an android navigation system application that detect the position and tracking you till you reach your desired position using the smart phones, and it has been met successfully.

We can present the features of the application and the major limitations of the application as follow:

5.2 Features • Developing and implement software solution for detecting a position and direction .

• Detect and display the user location in the map.

• Allow the user to choose between two modes, online & offline mode.

• Track the user location online or offline.

• Allow the user to choose between several types of maps .

• Provides the choice to display the compass . CHAPTER 5 CONCLUSION AND FUTURE WORK

• Provide the user to display the Mini Map .

• Provide compass to show the user's direction .

• provide routing pass through more than two points (current position, destination).

• Provide a GPS controlled by minimum number of time and distances so we can reduce the power consumption.

• Allow the user to lock the Map Activity so s\he can set the map at specific view .

• Provide the user the ability to choose between land scape view and oriented view .

5.3 Limitations  The application interface change if we it installed in version higher than 3.0.  There is lack of detailed map for Khartoum contains streets , POI’s and places .  We can’t download map for offline mode just one that pre saved for Khartoum .

 There is no limit for caching map tiles. This will consume the memory .

5.4 Future work The application can be enhanced by many options. Here we can present some of these options:

• Adding names for every station with a bus and the specific way for the specific station.

• implement feature of weather for each zones.

• Adding POI that classified as services perfection (5 stars and so on).

• Implementing a service to send the user location periodically to a set of saved numbers, to be used with very important persons (VIP), so that their current and past location will be known in case of emergency.

• Adding voice navigation capability to make the application awesome.

REFRENCES

6 REFRENCES 1. Android. (O.L). Retrieved from WikiPedia:

https://en.wikipedia.org/wiki/High tech

2. Apllication. (O.L). Retrieved from WikiPedia: https://en.wikipedia.org/wiki/Amazon_Appstore

3. Google Maps. (O.L.). Retrieved from WikiPedia: http://en.wikipedia.org/wiki/Google_Maps

4. GPS. (O.L.). Retrieved from WikiPedia: https://en.wikipedia.org/wiki/GPS_navigation_device

5. Mobile phone tracking. (O.L.). Retrieved from WikiPedia: http://en.wikipedia.org/wiki/Mobile_phone_tracking

6. Mobile_operating_system. (O.L). Retrieved from WikiPedia: https://en.wikipedia.org/wiki/Mobile_operating_system

7. Navigation. (O.L.). Retrieved from WikiPedia:

http://en.wikipedia.org/wiki/Navigation

8. Navigation. (O.L). Retrieved from WikiPpedia:

http://en.wikipedia.org/wiki/Term_of_art

9. OpenStreetMap. (n.d.). Retrieved from WikiPedia: http://en.wikipedia.org/wiki/OpenStreetMap

10. OVI Maps. (O.L). Retrieved from WikiPedia:

https://en.wikipedia.org/wiki/Ovi_Maps

11. Smart phone. (O.L). Retrieved from WikiPedia:

http://en.wikipedia.org/wiki/Smartphone

12. TomTom. (O.L). Retrieved from WikiPedia:

https://en.wikipedia.org/wiki/TomTom

13. . (O.L.). Retrieved from WikiPedia: http://en.wikipedia.org/wiki/Windows_Phone

APPENDIX A

7 APPENDIX A

Source Code

The source code is included in the attached CD.

A-1

APPENDIX B

8 APPENDIX B

Preparing Eclipse for android development Installing the Eclipse Plugin

Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT). This plugin provides a powerful, integrated environment in which to develop Android apps. It extends the capabilities of Eclipse to let you quickly set up new Android projects, build an app UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.

If you need to install Eclipse, download eclipse from available links.

Note: If you prefer to work in a different IDE, you do not need to install Eclipse or ADT. Instead, you can directly use the SDK tools to build and debug your application

Download the ADT Plugin

 Start Eclipse, then select Help > Install New Software.  Click Add, in the top-right corner.  In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/  Click OK.  If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).  In the Available Software dialog, select the checkbox next to Developer Tools and click Next.  In the next window, you'll see a list of the tools to be downloaded. Click Next.  Read and accept the license agreements, then click Finish.  If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.  When the installation completes, restart Eclipse.

B-1

Preparing Eclipse for android development

Configure the ADT Plugin

 Once Eclipse restarts, you must specify the location of your Android SDK directory:  In the "Welcome to Android Development" window that appears, select Use existing SDKs.  Browse and select the location of the Android SDK directory you recently downloaded and unpacked.  Click Next.  Your Eclipse IDE is now set up to develop Android apps, but you need to add the latest SDK platform tools and an Android platform to your environment.

B-2

APPENDIX C

9 APPENDIX C

STATE DIAGRAMS Airoway

1. Airport

Amenity 1. ATM 2. Bank 3. Bar 4. Bus station 5. Cafe 6. Casino 7. Car rental

Car sharing 1. Car wash 2. Cinema 3. Community Centre 4. Cycle parking 5. Dentist 6. Doctors 7. Fast food 8. Fire station 9. Fuel 10. Hospital 11. Kindergarten 12. Library 13. Marketplace 14. Night club

C-1

STATE DIAGRAMS

15. Nursery 16. Parking 17. Pharmacy 18. Phone booth 19. Police 20. Post box 21. Post office 22. Pub 23. Recycling point 24. Restaurant 25. Retirement home 26. School 27. Shelter 28. Taxi 29. Telephone 30. Theatre 31. Toilets 32. Town Hall 33. University 34. Veterinary surgery

Building 1. Church 2. Hotel

Historic 1. Castle 2. Monument 3. Land use 4. Cemetery 5. Landfill 6. Mine

C-2

STATE DIAGRAMS

7. Wood 8. Leisure 9. Golf course 10. Park 11. Stadium 12. Swimming pool

Natural 1. Beach

Public Transport 1. Station

Shop 1. Bakery 2. Book shop 3. Butcher 4. Car shop 5. Car dealer 6. Car parts 7. Car repair 8. Clothes shop 9. Convenience store

Discount items shop 1. Do-It-Yourself 2. Drugstore 3. Dry Cleaning 4. Fish shop 5. Florist 6. Furniture 7. Garden center 8. Gift shop C-3

STATE DIAGRAMS

9. Grocery shop 10. Haidresser 11. Jewelry shop 12. Kiosk 13. Laundry 14. Mall 15. Optician 16. Shoe shop 17. Sports shop 18. Supermarket 19. Toy shop 20. Travel agency

Sport 1. Sports pitch

Tourism 1. Attraction 2. Camp site 3. Caravan site 4. Information 5. Museum 6. Picnic site 7. Theme park 8. Viewpoint 9. Ruin 10. Water park 11. Zoo

Other POIs: 1. wikipedia 2. flickr 3. picasa C-4