SlideShare a Scribd company logo
1 of 44
Download to read offline
Plan Your Way
( An Android Application )
Undertaken by:
Muhammad Noman
REG NO.CIIT/FA10-BS(CS)-059/Wah
DEPARTMENT OF COMPUTER SCIENCES
COMSATS INSTITUTE OF INFORMATION TECHNOLOGY
WAH CANTT – PAKISTAN
SESSION 2010-2014
Plan Your Way
( An Android Application )
Undertaken by:
Muhammad Noman
REG NO.CIIT/FA10-BS(CS)-059/Wah
Supervised by:
Mr. Riaz Ahmed Bhatti
A DISSERTATION SUBMITTED AS A PARTIAL FULFILLMENT OF THE
REQUIREMENTS FOR THE DEGREE OF BACHELOR IN COMPUTER SCIENCE
DEPARTMENT OF COMPUTER SCIENCES
COMSATS INSTITUTE OF INFORMATION TECHNOLOGY,
WAH CANTT – PAKISTAN
SESSION 2010-2014
FINAL APPROVAL
Certified that we have read this project report submitted by Mr.
Muhammad Noman and it is, in our judgment, of sufficient standard to
warrant its acceptance by COMSATS Institute of Information
Technology, Wah Cantt, for the award of Bachelor degree in Computer
Science.
Committee:
1. External Examiner ___________________
Dr. Saad Rehman
Assistant Professor
E&ME College, Rawalpindi
2. Supervisor ___________________
Mr. Riaz Ahmed
3. Head of Department ___________________
Dr. Ehsan Ullah Munir
DEDICATION
To my loving and respected parents, teachers, and all those friends who were there
to help me in my project making
ACKNOWLEDEGMENT
In the name of Almighty Allah, the Most Kind and Most Merciful, without His
blessings it cannot be possible for me to complete my project “Plan Your Way”.
My success is the result of the technical guidelines, invaluable Comments and
moral support of my supervisor and for that i would like to thank my project
supervisor, Mr. Riaz Ahmed Bhatti, for keep tracking of project progress and
supporting throughout the project and having his trust in my ability to successfully
deliver it.
I would like to further extend my thanks to the whole teaching unit of the faculty
of Computer Science and project committee for their patience and all the guidance
and advises provided during the project progress.
I would like to thanks my parents and all other family members and friends who
kept backing me up in all the times, both monetarily and morally.
Muhammad Noman
PROJECT BRIEF
PROJECT NAME PLAN YOUR WAY
(ANDROID APPLICATION)
OBJECTIVE CREATING LOCATION
AWARENESS WITH EASY TO
USE APPLICATION OF SMART
PHONE
UNDERTAKEN BY MUHAMMAD NOMAN
SUPERVISED BY MR. RIAZ AHMED BHATTI
ASST. PROFESSOR
DEPARTMENT OF COMPUTER
SCIENCE
COMSATS WAH CANTT.
STARTED ON
COMPLETED ON
COMPUTER USED INTEL CORE i3
SOURCE LANGUAGE JAVA FOR ANDROID OS AND
XML (EXTENDED MARKUP
LANGUAGE)
JSON (Java Script Object Notation)
OPERATING SYSTEM WINDOWS 7 FOR PC
ANDROID (4.1.2) FOR MOBILE
TOOLS USED ECLIPSE ADT (ANDROID
DEVELOPMENT KIT)
ABSTRACT
“Plan your way” is an application for Smart Mobile devices operates on Android
operating system. Which provides Location based services; using android GPS, the
application is location aware. It keeps track of the user location in real time this
application will be able to find and present the shortest path between different
possible paths from current location to specified location.
Basically this application will be used for minimizing the cost of time and fuel
further it provides guidance to unknown person going to their destination. This
Application is able to highlights important places like Hotels, Hospitals, Picnic
spots and most importantly fuel stations. Weather forecasting is another feature in
this Application which keeps you informs what to wear at destination place. A
special feature for Muslim community is added in this Application which is
“locating the Kiblah direction” to offering their prayer in right direction, which is
normally misjudged at unknown places.
This page is intentionally left blank
i
TABLE OF CONTENTS
Plan Your Way
( An Android Application )
Chapter 1 ....................................................................................................................................... 1
Introduction................................................................................................................................... 2
1.1 Problem Statement............................................................................................................. 2
1.2 Objectives of the project.................................................................................................... 3
1.3 Features and functionality of the proposed system ........................................................ 3
1.4 Possible areas of application:............................................................................................ 4
1.5 Hardware Requirement..................................................................................................... 4
1.6 Interface Requirement....................................................................................................... 4
1.6.1 Operating System ......................................................................................................... 4
1.6.2 Programming Language ............................................................................................... 4
1.6.3 Environment ................................................................................................................. 4
1.6.4 GUI............................................................................................................................... 4
1.6.5 Other Tools................................................................................................................... 5
1.6.6 APIs .............................................................................................................................. 5
1.6.7 Android Version ........................................................................................................... 5
1.7 Technology to be used........................................................................................................ 5
Chapter 2 ....................................................................................................................................... 6
Background ................................................................................................................................... 6
2.1 Android Operating System ............................................................................................... 7
2.2 Why Android?.................................................................................................................... 7
Open Platform/ Manufacturer independent ......................................................................... 7
Three-tire Structure.............................................................................................................. 7
Rapid improvement.............................................................................................................. 8
Development Language options .......................................................................................... 8
ii
License Free......................................................................................................................... 8
Ease in Application Development ....................................................................................... 8
Popularity............................................................................................................................. 8
2.3 Challenges for Android ..................................................................................................... 9
Hard to Integrate for Vendors.............................................................................................. 9
Performance Consideration.................................................................................................. 9
Too Much Google Dependent.............................................................................................. 9
2.4 Limitations and constraints:............................................................................................. 9
Internet ............................................................................................................................... 10
Weather.............................................................................................................................. 10
Vehicles.............................................................................................................................. 10
2.5 Android in Future:........................................................................................................... 10
Chapter 3 ..................................................................................................................................... 11
Features and Design.................................................................................................................... 11
3.1 Features and Design Description.................................................................................... 12
3.1.1 Find shortest path to destination................................................................................. 12
3.1.2 Highlight Places of interest......................................................................................... 13
3.1.3 Compass for kiblah direction...................................................................................... 14
3.1.4 Maintaining History.................................................................................................... 14
Chapter 4 ..................................................................................................................................... 15
Components and Architecture................................................................................................... 15
4.1 Basic Architecture............................................................................................................ 16
4.2 Hardware & Other Components.................................................................................... 17
4.3 Google Data Base and API`s........................................................................................... 18
4.3.1 Map API ..................................................................................................................... 18
4.3.2 Places and Direction API............................................................................................ 18
Chapter 5 ..................................................................................................................................... 19
Methodology................................................................................................................................ 19
5.1 Data Flow.......................................................................................................................... 20
5.2 JSON (Java Script Object Notation).............................................................................. 20
5.3 Geo Coding and Reverse Geo Coding............................................................................ 21
iii
5.4 Interface and Information Exchange............................................................................. 21
5.5 Data Base File Handling and API`s................................................................................ 21
Chapter 6 ..................................................................................................................................... 23
Implementation ........................................................................................................................... 23
6.1 Using the On-Device GPS................................................................................................ 24
6.2 Calculating Distance between Two Points..................................................................... 24
6.3 Finding the interested places........................................................................................... 25
6.4 Finding the Qibla direction............................................................................................. 26
Chapter 7 ..................................................................................................................................... 27
Results.......................................................................................................................................... 27
Warnings for Internet Connection ...................................................................................... 28
Main Menu.......................................................................................................................... 28
Get Direction Activities...................................................................................................... 28
When Universities is selected from drop down menu ........................................................ 29
Interested Places Activities................................................................................................. 29
When Hospital is selected from drop down menu.............................................................. 30
Qibla Direction Activity ..................................................................................................... 30
References.................................................................................................................................... 31
Web sites............................................................................................................................. 32
Books .................................................................................................................................. 32
Papers.................................................................................................................................. 32
Chapter 1
Introduction
Introduction
Plan Your Way [An Android Application] 2
Introduction
“Plan your way” is an application for Smart Mobile devices operates on Android operating
system. Which provides Location based services; using android GPS, the application is location
aware. It keeps track of the user location in real time this application will be able to find and
present the shortest path between different possible paths from current location to specified
location. Basically it can be used for minimizing the cost of time and fuel further it provides
guidance to unknown person going to their destination. Th1is Application is able to highlights
important places like Hotels, Hospitals, Picnic spots and most importantly fuel stations. Weather
forecasting is another feature in this Application which keeps you informs what to wear at
destination place. A special feature for Muslim community is added in this Application which is
“locating the Kiblah direction” to offering their prayer in right direction, which is normally
misjudged at unknown places.
1. This project can be used for Guidance purpose which will guide you about your
destination by finding the shortest path, keeps you inform about places of interest
between the paths.
2. Energy Efficient; This Application leads you to the right way with minimum time and
cost.
3. Tourism; for planning trips and tours.
4. Self-tracking when you get lost at unknown place.
1.1 Problem Statement
The following problem statement briefly defines the boundaries and environment of this project:
An android application, which has the capability of location awareness, collects the
virtual information of user’s surroundings, by detecting and tracking user’s location in real time.
Introduction
Plan Your Way [An Android Application] 3
Using the GPS the application is fully location aware which keeps the track of user's location.
When the user move towards specific location, the application tracks the movement and displays
the current location. Then the application keeps on updating the information as the place
changes. According to user query it displays the shortest path to destination or displays important
places near to the current location like Hospital, Universities, Shops, Fuel Stations.., etc. The
additional information is displayed with the help of "Google" databases which helps the users to
interact in a more reliable way. Option for viewing the places in normal Google Map view as
well as Satellite View is also available.
1.2 Objectives of the project
Main objectives are:-
Primary objectives:
a) Find shortest Driving path to destination.
b) Highlight Places of interest like Picnic spots, Popular Hotels and Fuel stations etc.
(Provided with Option for viewing places in Satellite View as well as Normal Google Map
View)
Secondary Objectives:
a) Maintaining the history of user activity.
b) Compass for kiblah direction.
c) Weather forecast of Destination place.
1.3 Features and functionality of the proposed system
The proposed system requires smart device, a mobile phone with GPS Technology. Basic
architecture of the system is that a mobile phone having internet connectivity with Wi-Fi or
GPRS. On launching the application mobile get the co-ordinates of current location using build
in GPS device or from internet, which is used for finding the path to destination (destination co-
ordinates are input to the system). For other feature of Application some queries are required
which are executed according to user input.
Introduction
Plan Your Way [An Android Application] 4
1.4 Possible areas of application:
 This project can be used for Guidance purpose which will guide you about your
destination by finding the shortest path, keeps you inform about weather and places
of interest between the paths.
 Energy Efficient; This Application leads you to the right way with minimum time
and cost.
 Tourism; for planning trips and tours.
 Self-tracking when you get lost at unknown place.
1.5 Hardware Requirement
 A PC (Personal Computer) having Windows 7 Operating System
 Mobile phone having Android Operating System with GPS Technology
 Emulator (Virtual Mobile Phone)
1.6 Interface Requirement
1.6.1 Operating System
The platform used for development of this project is Windows 7 Operating
system.
1.6.2 Programming Language
Java and XML is used as a development language.
1.6.3 Environment
Eclipse (v22.0.5-757759)
1.6.4 GUI
The GUI (Graphical User Interface) is designed in eclipse using XML
Introduction
Plan Your Way [An Android Application] 5
1.6.5 Other Tools
Java JDK (Java Development Kit)
Android SDK (Software Development Kit)
Etc.
1.6.6 APIs
Google Maps API, Places API, Direction API, has also been used in the
development of this application
1.6.7 Android Version
Minimum requirement for android version of this application is v. 2.3.4.
Target version is 4.1.2 Jelly Bean.
1.7 Technology to be used
i. ADT Bundle (Android Development Toolkit)
ii. Android SDK
iii. API`s ( Google Map API, Location API, Direction API)
iv. Smartphone with Wi-Fi and GPS Device
v. Google Online Database
Chapter 2
Background
Background
Plan Your Way [An Android Application] 7
2.1 Android Operating System
There is a lot of advancement in the OS (Operating Systems) since the last few decades. When
we look at the early stages of the cell phones, the black and white phones were came into focus
but with the passage of time, cell phones were pushed onto the next level and now smart phones
are particularly in focus. Mobile OS has come into horizon. In past Symbian and Java Operating
System were used for Mobile devices but a revolution came in mobile industry. The operating
systems for smart phones & tablets, there was a need of change, so after the year 2000 the OS
like Android and Blackberry were urbanized (came into existence).
With the passage of time, among all the greatest and widely used mobile operating systems there
was android. Android Inc. was founded in Palo Alto of California, U.S. by Andy Rubin, Rich
miner, and Chris White in early 2000. Then later on in 2005 Android was picked up by Google.
With the advancement in Android OS, numerous versions were introduced. After that there have
been number of updates are still coming in order to satisfy the user need perfectly. Android
Operating System gives the flexibility for both (users & developers).
2.2 Why Android?
The Key reasons that forced us to choose Android were:
 Open Platform/ Manufacturer independent
Android is not constraint to any maker, so it allows us to develop and change the
existence of original and makes us more innovative in the development process.
 Three-tire Structure
For development it follows Three-tier structure which gives freedom to developers to
program dynamically. XML separates the user interface from actual data and other Java
Background
Plan Your Way [An Android Application] 8
coding for function execution. So data interface and business logic remain separate which
is very important for dynamic programing or when requirement changed accordingly.
 Rapid improvement
As the developer of Android, we have the opportunity to take the advancement to the
next level. Advancement can be in any form like the OLED display in the Android cell
phones.
 Development Language options
Many mobile applications can be developed in any language like JAVA, Perl etc.
Android provides the options to interact with different languages for more productive
development. Such as: XML, JAVA and other Libraries for particular functions.
 License Free
The license expenses does matter a lot, which is not noticeable in the Android
development because of its free sourcing advantage.
 Ease in Application Development
Error checking and Debugging become more efficient and easy to handle. The emulator
plays an important role in the testing process of any application made for android with
the help of Android SDK (Software Development Kit).
 Popularity
With more advancement in android, it has become the most popular OS of all times as
compared to others.
Background
Plan Your Way [An Android Application] 9
2.3 Challenges for Android
 Hard to Integrate for Vendors
When talking about the IOS, the developers have to deal with fewer complications in the
developing process because of the fewer versions. The same is not the case with Android
applications. There are different brands in the market offering different screen sizes and
using various kinds of processors. So this makes a great deal of opportunity for the
android developers to innovate something new which can be nearly compared to as a
difficult task.
 Performance Consideration
Every device has its own way of handling itself. Different brands, offering different
devices with various screen sizes and using various kinds of processors results in
performance issues.
 Too Much Google Dependent
When talking about android, we automatically came to know that it is a lot in the handled
by Google. Google makes Android a bit more terms independent which makes it much
better.
2.4 Limitations and constraints:
Since satellite transmission power is low, certain geographical conditions may cause problems
with a GPS receiver’s ability to record location data.
Background
Plan Your Way [An Android Application] 10
Internet
This Application heavily depends on Internet connection. This Application fails to work
if connection is not available.
Weather
Signal strength can become degraded by moisture such as rainfall, fog, or snowfall.
Vehicles
Signals can be lost when any person is riding in a car or other enclosed means of
Transportation if the receiver is not placed near a window within the vehicle.
2.5 Android in Future:
The future years are going to introduce Android to a greater level. The developed applications in
Android are well known by the Android users. In imminent, developers will be in a big problem
in deciding their launch of first applications. The growing Android base is absolutely a positive
factor. In other words, the Android Application Developers cannot fail to notice the positive
response that they can earn with Android based Smartphone.
Chapter 3
Features and Design
Features and Design
Plan Your Way [An Android Application] 12
Main Menu
3.1 Features and Design Description
This Application provides Location based services; this
application will be able to find and mark the complete path from
current location to specified location. This Application uses
Google API for Displaying Maps. Due to Android GPS, the
application is location aware. This application facilitates those
people who move from one place to another (some time to
unknown place) which is used for Route guidance and location
awareness.
Basically it can be used for minimizing the cost of time and fuel
further it provides guidance to unknown person going to their
destination. This Application is able to highlights important
places like Hotels, Hospitals, Picnic spots and most importantly
fuel stations. Weather forecasting is another feature in this
Application which keeps you informs what to wear at destination
place. A special feature for Muslim community is added in this
Application which is “locating the Kiblah direction” to offering
their prayer in right direction, which is normally misjudged at
unknown places.
3.1.1 Find shortest path to destination.
Get Direction button in main menu is served to start
GetDirection.java activity. Current location is
automatically captured through GPS device present in
smart phone by putting a marker on Map. Destination place
is inputted to the system using Edit Text box. By pressing
the Get Route Button on Get Direction Activity, a complete
shortest path is displayed on Google Map and prompts the
total distance from current location to destination. Map
View can be changed to Satellite view as well as Normal
Features and Design
Plan Your Way [An Android Application] 13
View for better interaction of user with locations.
3.1.2 Highlight Places of interest
Interested Places button in main menu is served to start
Interested Places.java activity. It displays a list of
important places like: Hospitals, Universities, picnic
spots, Hotels and Restaurants, etc. if any one of those
particular places is selected then all location of that
particular place is presented on Map with markers.
Further details about specific locationis displayed if
user click/tap on particular marker and Information
Window.
Features and Design
Plan Your Way [An Android Application] 14
3.1.3 Compass for kiblah direction.
Qibla Direction button in main menu is served to start
Qibla Direction.java activity. It gets the current
coordinate and calculate the direction of qibla which
is used further in displaying pointer, toward qibla , on
the real time compass. By moving the mobile, the
compass as well as pointer moves according to the
qibla direction.
3.1.4 Maintaining History
Another feature of this application is that it maintains
the user history.
When user tap Get Route button, a file is appended
with destination place and current place name with
total distance and current date.
User can retrieve history by taping the history button
available on GetDirection.java Activity.
Chapter 4
Components and Architecture
Components and Architecture
Plan Your Way [An Android Application] 16
System Diagram
4.1 Basic Architecture
Basic architecture for my application Plan Your Way consists of:
 Three-tier Architecture
E.g. Interface layer, Data Access Layer and Program Logic
 Input place conversion to Coordinates and vice versa.
E.g. Geo Coding and Decoding
 Google Database
 Mobile Hardware Devices
E.g. Compass, GPS, Wi-Fi
 API`s (Application Program Interface)
E.g. Google Maps, Google Places, Google Direction and Google Weather API`s
Components and Architecture
Plan Your Way [An Android Application] 17
4.2 Hardware & Other Components
The following picture shows the hardware & other components that I used in my project Plan
Your Way.
 The GPS is getting the current location of a user. The surrounding information is well
known to the user when the current location is identified correctly.
 Compass is getting the NEWS (North East West South) direction information.
 Maps are loaded from internet and displayed on mobile device.
Compass
Components and Architecture
Plan Your Way [An Android Application] 18
4.3 Google Data Base and API`s
All information about places and direction is collected from already maintained database by
Google Corp. Google has one of the largest but also one of the greenest data center
infrastructures among the world’s companies. Google has been an industry leader in releasing
information about the world which consists of places, roads, etc.
4.3.1 Map API
Google Map API is used to inter link mobile phone with the world using maps. This
application retrieve map from cloud and put it on screen of smart phone for user interaction
with the world. This API also allow to get the input from user as he/she touch on the map and
map can be animated using program logic.
4.3.2 Places and Direction API
The Google Places API is a service that returns information about Places — defined within
this API as establishments, geographic locations, or prominent points of interest — using
HTTP requests. Place requests specify locations as latitude/longitude coordinates.
The Google Directions API is a service that calculates directions between locations using an
HTTP request. You can search for directions for several modes of transportation, include
transit, driving, walking or cycling. Directions may specify origins, destinations and
waypoints either as text strings (e.g. "Chicago, IL" or "Darwin, NT, Australia") or as
latitude/longitude coordinates. The Directions API can return multi-part directions using a
series of waypoints.
Chapter 5
Methodology
Methodology
Plan Your Way [An Android Application] 20
5.1 Data Flow
Data flow depends on the functionality of the application either data is retrieve from internet or
sent over internet in the form of query. Data also flows between different activities of application
and between different layers of application such as interface and data access layer for
information processing.
 Get current location from GPS of mobile phone and destination place from user from
interface.
 Calculate Distance and Direction as well as displaying route on the Google Map.
 Send query about interested places to Google Database and get the result in JSON format
further which is processed and presented on the user screen.
 Getting the position or rotation of mobile from Compass sensor build in the device and
relatively calculating the Qibla direction from user`s current location acquired previously.
5.2 JSON (Java Script Object Notation)
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for
humans to read and write. It is easy for machines to parse and generate. It is based on a subset of
the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.
JSON is a text format that is completely language independent but uses conventions that are
familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript,
Perl, Python, and many others. These properties make JSON an ideal data-interchange language.
JSON is built on two structures:
 A collection of name/value pairs. In various languages, this is realized as an object,
record, dictionary, hash table, keyed list, or associative array.
 An ordered list of values. In most languages, this is realized as an array, vector, list, or
sequence.
Methodology
Plan Your Way [An Android Application] 21
5.3 Geo Coding and Reverse Geo Coding
Geocoding is the process of finding associated geographic coordinates (often expressed as
latitude and longitude) from other geographic data, such as street addresses, or ZIP codes (postal
codes). With geographic coordinates the features can be mapped and entered into Geographic
Information Systems, or the coordinates can be embedded into media such as digital photographs
via Geo tagging.
Reverse geocoding is the opposite: finding an associated textual location such as a street address,
from geographic coordinates.
A Geo coder is an algorithm of a piece of software or a (web) service that helps in this process.
5.4 Interface and Information Exchange
Different XML files are used in project for creating Screen interfaces of application. While .java
files have been used for accessing these interface objects or views for displaying information on
screen in some proper way or format
Data exchange between XML file and Java files are in the form of Strings, so lot of string
process involves in whole project.
5.5 Data Base File Handling and API`s
All information about places and direction is collected from already maintained database by
Google Corp. Google has one of the largest but also one of the greenest data center
infrastructures among the world’s companies. Google has been an industry leader in releasing
information about the world which consists of places, roads, etc.
Keeping History
One of the important feature of this application is that it maintains the user history.
File handling is used for keeping user history. When user tap Get Route button, a file is
appended with destination place and current place name with total distance and current date.
User can retrieve history by taping the history button available on GetDirection.java Activity.
Methodology
Plan Your Way [An Android Application] 22
Map API
Google Map API is used to inter link mobile phone with the world using maps. This
application retrieve map from cloud and put it on screen of smart phone for user interaction
with the world. This API also allow to get the input from user as he/she touch on the map and
map can be animated using program logic.
Places and Direction API
The Google Places API is a service that returns information about Places — defined within
this API as establishments, geographic locations, or prominent points of interest — using
HTTP requests. Place requests specify locations as latitude/longitude coordinates.
The Google Directions API is a service that calculates directions between locations using an
HTTP request. You can search for directions for several modes of transportation, include
transit, driving, walking or cycling. Directions may specify origins, destinations and
waypoints either as text strings (e.g. "Chicago, IL" or "Darwin, NT, Australia") or as
latitude/longitude coordinates. The Directions API can return multi-part directions using a
series of waypoints.
Chapter 6
Implementation
Implementation
Plan Your Way [An Android Application] 24
6.1 Using the On-Device GPS
For this location-based application, it’s crucial that we know where exactly the device located.
And, for accuracy, we want the best location provider which is available on the device
Applications which use any sort of location data from the device need certain location
permissions. For this purpose, there are two options available. One is to use a coarse location that
returns a location which is based on cellular towers or known as Wi-Fi access points. This level
of result works great for determining what city we are in and maybe the locality. However, it
probably won’t be able to determine which street or block you’re on correctly.
The other option is to use the fine location, which uses the GPS on the device to get an accurate
position. It may take a little longer, but uses GPS satellites and cellular towers to increase the
location accuracy. Fine location data can be helpful for determining what side of the street we
are on. It’s basically the level of accuracy and exactness that is generally used for AR apps.
So the next step here will be to add permissions in the manifest file.To Listen the Location by
using the Location Listener interface. It will include methods will deal with the location data
when a location is changed, setting the accuracy criteria, requesting location updates, getting the
best provider etc.
6.2 Calculating Distance between Two Points
We are interested in the direction and route guidance from current location to destination
location. In navigation, this is called the bearing. A path between two points on a spherical
object, such as the planet Earth, is shortest by following what’s called the great-circle distance.
By using TSP (Traveling Salesman Problem) techniques, Direction API finds shortest route
between locations, this would be reasonable distance mechanism to use. As we input destination
location to the system, API implement the algorithm we only need to parse the information came
as an output from API.
An alternate solution might be to calculate a straight line, in 3D space, between two points on the
sphere. This method assumes that a path through the sphere, as opposed to around its surface, but
this method is not in the least useful.
Implementation
Plan Your Way [An Android Application] 25
6.3 Finding the interested places
A Nearby Search algorithm in application lets search for Places within a specified area. We can
refine our search request by supplying keywords or specifying the type of Place we are searching
for.
A Nearby Search request is an HTTP URL of the following
form:https://maps.googleapis.com/maps/api/place/nearbysearch/output?parameters
where output may be either of the following values:
 JSON (recommended) indicates output in JavaScript Object Notation (JSON)
 xml indicates output as XML
We only need to parse this information so that we used this for our specific purpose in
application. E.g. To display nearby places on the Google Map using markers and other icons.
Implementation
Plan Your Way [An Android Application] 26
6.4 Finding the Qibla direction
For finding Qibla direction at particular place firstly we get the current location from GPS or
through cellular towers then we calculate the bearing or direction angle between the coordinates
of our location towards the Qibla or Mecca coordinates.
Mobile`s build in compass is used to get the value of rotation towards N, E, W, S (North East
West South)poles which is used to rotate the pointer as well as compass accordingly.
A user friendly menu is created in XML which is used to handle all these operations in my
application “Plan Your Way”.
Chapter 7
Results
Results
Plan Your Way [An Android Application] 28
Main Menu Warnings for Internet
Connection
Get Direction
Activities
Results
Plan Your Way [An Android Application] 29
Interested Places
Activities
Map View
&
SattiliteView
When
Universities is
selected from
drop down
menu
Results
Plan Your Way [An Android Application] 30
When Hospital is
selected from drop
down menu
Qibla Direction
Activity
References
References
Plan Your Way [An Android Application] 32
Web sites
http://www.lynda.com
http://www.howstuffworks.com/augmented-reality.htm
http://developer.android.com/guide/topics/location/index.html
http://developer.android.com/training/articles/security-tips.html
Books
Beginning Android™ Application Development by Wei-Meng Lee
Android Programming Tutorials by Mark L. Murphy
Papers
Boris V. Cherkassky , Andrew V. Goldberg , Tomasz Radzik, Shortest
paths algorithms: theory and experimental evaluation, Mathematical
Programming: Series A and B, v.73 n.2, p.129-174, May 31,
1996 [doi>10.1007/BF02592101]
Pettie, S., Ramachandran, V., Sridhar, S.: Experimental evaluation of a
new shortest path algorithm. In: Mount, D.M., Stein, C. (eds.) ALENEX
2002. LNCS, vol. 2409, pp. 126–142. Springer, Heidelberg (2002)

More Related Content

What's hot

Introduction to Cloud computing and AWS services
Introduction to Cloud computing and AWS servicesIntroduction to Cloud computing and AWS services
Introduction to Cloud computing and AWS servicesAhmed Alaa
 
Understanding Azure Disaster Recovery
Understanding Azure Disaster RecoveryUnderstanding Azure Disaster Recovery
Understanding Azure Disaster RecoveryNew Horizons Ireland
 
Microsoft Azure - Introduction to microsoft's public cloud
Microsoft Azure - Introduction to microsoft's public cloudMicrosoft Azure - Introduction to microsoft's public cloud
Microsoft Azure - Introduction to microsoft's public cloudAtanas Gergiminov
 
Disaster Recovery of on-premises IT infrastructure with AWS
Disaster Recovery of on-premises IT infrastructure with AWS Disaster Recovery of on-premises IT infrastructure with AWS
Disaster Recovery of on-premises IT infrastructure with AWS Amazon Web Services
 
AWS Direct Connect: Deep Dive (NET403) - AWS re:Invent 2018
AWS Direct Connect: Deep Dive (NET403) - AWS re:Invent 2018AWS Direct Connect: Deep Dive (NET403) - AWS re:Invent 2018
AWS Direct Connect: Deep Dive (NET403) - AWS re:Invent 2018Amazon Web Services
 
Introduction to Azure Machine Learning
Introduction to Azure Machine LearningIntroduction to Azure Machine Learning
Introduction to Azure Machine LearningPaul Prae
 
Key Challenges In CLOUD COMPUTING
Key Challenges In CLOUD COMPUTINGKey Challenges In CLOUD COMPUTING
Key Challenges In CLOUD COMPUTINGAtul Chounde
 
Protocols For Self Organisation Of A Wireless Sensor Network
Protocols For Self Organisation Of A Wireless Sensor NetworkProtocols For Self Organisation Of A Wireless Sensor Network
Protocols For Self Organisation Of A Wireless Sensor NetworkSaatviga Sudhahar
 
AWS | VPC Peering
AWS | VPC PeeringAWS | VPC Peering
AWS | VPC PeeringMohan Reddy
 
Azure Introduction
Azure IntroductionAzure Introduction
Azure Introductionbrunoterkaly
 
Using Virtual Private Cloud (vpc)
Using Virtual Private Cloud (vpc)Using Virtual Private Cloud (vpc)
Using Virtual Private Cloud (vpc)Amazon Web Services
 
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...Amazon Web Services
 
Unit 2 -Cloud Computing Architecture
Unit 2 -Cloud Computing ArchitectureUnit 2 -Cloud Computing Architecture
Unit 2 -Cloud Computing ArchitectureMonishaNehkal
 
Azure virtual network
Azure virtual networkAzure virtual network
Azure virtual networkLalit Rawat
 
Microsoft Azure Security Overview
Microsoft Azure Security OverviewMicrosoft Azure Security Overview
Microsoft Azure Security OverviewAlert Logic
 

What's hot (20)

Introduction to Cloud computing and AWS services
Introduction to Cloud computing and AWS servicesIntroduction to Cloud computing and AWS services
Introduction to Cloud computing and AWS services
 
Understanding Azure Disaster Recovery
Understanding Azure Disaster RecoveryUnderstanding Azure Disaster Recovery
Understanding Azure Disaster Recovery
 
Microsoft Azure - Introduction to microsoft's public cloud
Microsoft Azure - Introduction to microsoft's public cloudMicrosoft Azure - Introduction to microsoft's public cloud
Microsoft Azure - Introduction to microsoft's public cloud
 
Disaster Recovery of on-premises IT infrastructure with AWS
Disaster Recovery of on-premises IT infrastructure with AWS Disaster Recovery of on-premises IT infrastructure with AWS
Disaster Recovery of on-premises IT infrastructure with AWS
 
AWS Direct Connect: Deep Dive (NET403) - AWS re:Invent 2018
AWS Direct Connect: Deep Dive (NET403) - AWS re:Invent 2018AWS Direct Connect: Deep Dive (NET403) - AWS re:Invent 2018
AWS Direct Connect: Deep Dive (NET403) - AWS re:Invent 2018
 
Windows Azure Service Bus
Windows Azure Service BusWindows Azure Service Bus
Windows Azure Service Bus
 
Introduction to Azure Machine Learning
Introduction to Azure Machine LearningIntroduction to Azure Machine Learning
Introduction to Azure Machine Learning
 
Key Challenges In CLOUD COMPUTING
Key Challenges In CLOUD COMPUTINGKey Challenges In CLOUD COMPUTING
Key Challenges In CLOUD COMPUTING
 
Aruba OS 7.3 User Guide
Aruba OS 7.3 User GuideAruba OS 7.3 User Guide
Aruba OS 7.3 User Guide
 
Protocols For Self Organisation Of A Wireless Sensor Network
Protocols For Self Organisation Of A Wireless Sensor NetworkProtocols For Self Organisation Of A Wireless Sensor Network
Protocols For Self Organisation Of A Wireless Sensor Network
 
AWS | VPC Peering
AWS | VPC PeeringAWS | VPC Peering
AWS | VPC Peering
 
Azure Introduction
Azure IntroductionAzure Introduction
Azure Introduction
 
Using Virtual Private Cloud (vpc)
Using Virtual Private Cloud (vpc)Using Virtual Private Cloud (vpc)
Using Virtual Private Cloud (vpc)
 
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...
Amazon Virtual Private Cloud (VPC) - Networking Fundamentals and Connectivity...
 
Unit 2 -Cloud Computing Architecture
Unit 2 -Cloud Computing ArchitectureUnit 2 -Cloud Computing Architecture
Unit 2 -Cloud Computing Architecture
 
Azure virtual network
Azure virtual networkAzure virtual network
Azure virtual network
 
Introduction to VANET
Introduction to VANETIntroduction to VANET
Introduction to VANET
 
Azure Security Overview
Azure Security OverviewAzure Security Overview
Azure Security Overview
 
Azure: PaaS or IaaS
Azure: PaaS or IaaSAzure: PaaS or IaaS
Azure: PaaS or IaaS
 
Microsoft Azure Security Overview
Microsoft Azure Security OverviewMicrosoft Azure Security Overview
Microsoft Azure Security Overview
 

Viewers also liked

Memoria sobre el estado de las provincias internas
Memoria sobre el estado de las provincias internasMemoria sobre el estado de las provincias internas
Memoria sobre el estado de las provincias internasSelene Catarino
 
NvR_SACLAP portfolio 2011_final 70
NvR_SACLAP portfolio 2011_final 70NvR_SACLAP portfolio 2011_final 70
NvR_SACLAP portfolio 2011_final 70Stephan Barnard
 
Black Back Ground
Black Back GroundBlack Back Ground
Black Back GroundUrsula Sch
 
Landscape & Wetland Rehabilitation Proposal
Landscape & Wetland Rehabilitation ProposalLandscape & Wetland Rehabilitation Proposal
Landscape & Wetland Rehabilitation ProposalStephan Barnard
 
Spirit of Valencia Team introduction
Spirit of Valencia Team introductionSpirit of Valencia Team introduction
Spirit of Valencia Team introductionMichael Robert Gill
 
Deliverance boot camp (part 8)
Deliverance boot camp (part 8)Deliverance boot camp (part 8)
Deliverance boot camp (part 8)sebastianscott
 
Cultura y clima organizacional bimbo
Cultura y clima organizacional bimboCultura y clima organizacional bimbo
Cultura y clima organizacional bimboArturo Perez
 
Terapia psicoanalitica
Terapia psicoanaliticaTerapia psicoanalitica
Terapia psicoanaliticaHidriss
 

Viewers also liked (11)

Memoria sobre el estado de las provincias internas
Memoria sobre el estado de las provincias internasMemoria sobre el estado de las provincias internas
Memoria sobre el estado de las provincias internas
 
Wpldn july2015 usb
Wpldn july2015 usbWpldn july2015 usb
Wpldn july2015 usb
 
NvR_SACLAP portfolio 2011_final 70
NvR_SACLAP portfolio 2011_final 70NvR_SACLAP portfolio 2011_final 70
NvR_SACLAP portfolio 2011_final 70
 
Black Back Ground
Black Back GroundBlack Back Ground
Black Back Ground
 
Untitled-11
Untitled-11Untitled-11
Untitled-11
 
Landscape & Wetland Rehabilitation Proposal
Landscape & Wetland Rehabilitation ProposalLandscape & Wetland Rehabilitation Proposal
Landscape & Wetland Rehabilitation Proposal
 
Spirit of Valencia Team introduction
Spirit of Valencia Team introductionSpirit of Valencia Team introduction
Spirit of Valencia Team introduction
 
Deliverance boot camp (part 8)
Deliverance boot camp (part 8)Deliverance boot camp (part 8)
Deliverance boot camp (part 8)
 
Fluxograma
FluxogramaFluxograma
Fluxograma
 
Cultura y clima organizacional bimbo
Cultura y clima organizacional bimboCultura y clima organizacional bimbo
Cultura y clima organizacional bimbo
 
Terapia psicoanalitica
Terapia psicoanaliticaTerapia psicoanalitica
Terapia psicoanalitica
 

Similar to Final FYP Report

1112566_Dissertation
1112566_Dissertation1112566_Dissertation
1112566_DissertationHarry Hall
 
AMIZONER: Final Report
AMIZONER: Final ReportAMIZONER: Final Report
AMIZONER: Final ReportNeil Mathew
 
IRJET- Campus Navigation System Based on Mobile Augmented Reality
IRJET- Campus Navigation System Based on Mobile Augmented RealityIRJET- Campus Navigation System Based on Mobile Augmented Reality
IRJET- Campus Navigation System Based on Mobile Augmented RealityIRJET Journal
 
common_report_2
common_report_2common_report_2
common_report_2RAHEEMA PP
 
Electronic Notice Board Using Raspberry Pi and Android Phone
Electronic Notice Board Using Raspberry Pi and Android PhoneElectronic Notice Board Using Raspberry Pi and Android Phone
Electronic Notice Board Using Raspberry Pi and Android PhoneBrijender k
 
RAPA Project Documentaion
RAPA Project DocumentaionRAPA Project Documentaion
RAPA Project DocumentaionKhaled El Sawy
 
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...Ibrahim Özgön
 
NayLinnKo_BIT_InteractionDesign
NayLinnKo_BIT_InteractionDesignNayLinnKo_BIT_InteractionDesign
NayLinnKo_BIT_InteractionDesignNay Linn Ko
 
IRJET- University Campus Event Navigation System
IRJET-  	  University Campus Event Navigation System   IRJET-  	  University Campus Event Navigation System
IRJET- University Campus Event Navigation System IRJET Journal
 
ANDROID MAPPING APPLICATION
ANDROID MAPPING APPLICATIONANDROID MAPPING APPLICATION
ANDROID MAPPING APPLICATIONcsandit
 
SMART MECHANIC SYSTEM
SMART MECHANIC SYSTEMSMART MECHANIC SYSTEM
SMART MECHANIC SYSTEMIRJET Journal
 
Latest proposal project info zakat
Latest proposal project info zakatLatest proposal project info zakat
Latest proposal project info zakatUmmi Zakiah
 
Project report on IR based vehicle with automatic braking and driver awakenin...
Project report on IR based vehicle with automatic braking and driver awakenin...Project report on IR based vehicle with automatic braking and driver awakenin...
Project report on IR based vehicle with automatic braking and driver awakenin...Neeraj Khatri
 
Location sharing and automatic message sender Android Application
Location sharing and automatic message sender Android ApplicationLocation sharing and automatic message sender Android Application
Location sharing and automatic message sender Android ApplicationKavita Sharma
 
Camara for uav jan2012 eas 021
Camara for uav jan2012 eas 021Camara for uav jan2012 eas 021
Camara for uav jan2012 eas 021M.L. Kamalasana
 

Similar to Final FYP Report (20)

1112566_Dissertation
1112566_Dissertation1112566_Dissertation
1112566_Dissertation
 
AMIZONER: Final Report
AMIZONER: Final ReportAMIZONER: Final Report
AMIZONER: Final Report
 
PROJECT REPORT
PROJECT REPORTPROJECT REPORT
PROJECT REPORT
 
IRJET- Campus Navigation System Based on Mobile Augmented Reality
IRJET- Campus Navigation System Based on Mobile Augmented RealityIRJET- Campus Navigation System Based on Mobile Augmented Reality
IRJET- Campus Navigation System Based on Mobile Augmented Reality
 
common_report_2
common_report_2common_report_2
common_report_2
 
Electronic Notice Board Using Raspberry Pi and Android Phone
Electronic Notice Board Using Raspberry Pi and Android PhoneElectronic Notice Board Using Raspberry Pi and Android Phone
Electronic Notice Board Using Raspberry Pi and Android Phone
 
RAPA Project Documentaion
RAPA Project DocumentaionRAPA Project Documentaion
RAPA Project Documentaion
 
Core Java Training report
Core Java Training reportCore Java Training report
Core Java Training report
 
Automated card recharge android application
Automated card recharge android applicationAutomated card recharge android application
Automated card recharge android application
 
Automated card recharge android application
Automated card recharge android applicationAutomated card recharge android application
Automated card recharge android application
 
Automated card recharge android application
Automated card recharge android applicationAutomated card recharge android application
Automated card recharge android application
 
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
THE DESIGN IN MOBILE AND WEB PLATFORM OF THE LOCATION IDENTIFICATION APPLICAT...
 
NayLinnKo_BIT_InteractionDesign
NayLinnKo_BIT_InteractionDesignNayLinnKo_BIT_InteractionDesign
NayLinnKo_BIT_InteractionDesign
 
IRJET- University Campus Event Navigation System
IRJET-  	  University Campus Event Navigation System   IRJET-  	  University Campus Event Navigation System
IRJET- University Campus Event Navigation System
 
ANDROID MAPPING APPLICATION
ANDROID MAPPING APPLICATIONANDROID MAPPING APPLICATION
ANDROID MAPPING APPLICATION
 
SMART MECHANIC SYSTEM
SMART MECHANIC SYSTEMSMART MECHANIC SYSTEM
SMART MECHANIC SYSTEM
 
Latest proposal project info zakat
Latest proposal project info zakatLatest proposal project info zakat
Latest proposal project info zakat
 
Project report on IR based vehicle with automatic braking and driver awakenin...
Project report on IR based vehicle with automatic braking and driver awakenin...Project report on IR based vehicle with automatic braking and driver awakenin...
Project report on IR based vehicle with automatic braking and driver awakenin...
 
Location sharing and automatic message sender Android Application
Location sharing and automatic message sender Android ApplicationLocation sharing and automatic message sender Android Application
Location sharing and automatic message sender Android Application
 
Camara for uav jan2012 eas 021
Camara for uav jan2012 eas 021Camara for uav jan2012 eas 021
Camara for uav jan2012 eas 021
 

Final FYP Report

  • 1. Plan Your Way ( An Android Application ) Undertaken by: Muhammad Noman REG NO.CIIT/FA10-BS(CS)-059/Wah DEPARTMENT OF COMPUTER SCIENCES COMSATS INSTITUTE OF INFORMATION TECHNOLOGY WAH CANTT – PAKISTAN SESSION 2010-2014
  • 2. Plan Your Way ( An Android Application ) Undertaken by: Muhammad Noman REG NO.CIIT/FA10-BS(CS)-059/Wah Supervised by: Mr. Riaz Ahmed Bhatti A DISSERTATION SUBMITTED AS A PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF BACHELOR IN COMPUTER SCIENCE DEPARTMENT OF COMPUTER SCIENCES COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, WAH CANTT – PAKISTAN SESSION 2010-2014
  • 3. FINAL APPROVAL Certified that we have read this project report submitted by Mr. Muhammad Noman and it is, in our judgment, of sufficient standard to warrant its acceptance by COMSATS Institute of Information Technology, Wah Cantt, for the award of Bachelor degree in Computer Science. Committee: 1. External Examiner ___________________ Dr. Saad Rehman Assistant Professor E&ME College, Rawalpindi 2. Supervisor ___________________ Mr. Riaz Ahmed 3. Head of Department ___________________ Dr. Ehsan Ullah Munir
  • 4. DEDICATION To my loving and respected parents, teachers, and all those friends who were there to help me in my project making
  • 5. ACKNOWLEDEGMENT In the name of Almighty Allah, the Most Kind and Most Merciful, without His blessings it cannot be possible for me to complete my project “Plan Your Way”. My success is the result of the technical guidelines, invaluable Comments and moral support of my supervisor and for that i would like to thank my project supervisor, Mr. Riaz Ahmed Bhatti, for keep tracking of project progress and supporting throughout the project and having his trust in my ability to successfully deliver it. I would like to further extend my thanks to the whole teaching unit of the faculty of Computer Science and project committee for their patience and all the guidance and advises provided during the project progress. I would like to thanks my parents and all other family members and friends who kept backing me up in all the times, both monetarily and morally. Muhammad Noman
  • 6. PROJECT BRIEF PROJECT NAME PLAN YOUR WAY (ANDROID APPLICATION) OBJECTIVE CREATING LOCATION AWARENESS WITH EASY TO USE APPLICATION OF SMART PHONE UNDERTAKEN BY MUHAMMAD NOMAN SUPERVISED BY MR. RIAZ AHMED BHATTI ASST. PROFESSOR DEPARTMENT OF COMPUTER SCIENCE COMSATS WAH CANTT. STARTED ON COMPLETED ON COMPUTER USED INTEL CORE i3
  • 7. SOURCE LANGUAGE JAVA FOR ANDROID OS AND XML (EXTENDED MARKUP LANGUAGE) JSON (Java Script Object Notation) OPERATING SYSTEM WINDOWS 7 FOR PC ANDROID (4.1.2) FOR MOBILE TOOLS USED ECLIPSE ADT (ANDROID DEVELOPMENT KIT)
  • 8. ABSTRACT “Plan your way” is an application for Smart Mobile devices operates on Android operating system. Which provides Location based services; using android GPS, the application is location aware. It keeps track of the user location in real time this application will be able to find and present the shortest path between different possible paths from current location to specified location. Basically this application will be used for minimizing the cost of time and fuel further it provides guidance to unknown person going to their destination. This Application is able to highlights important places like Hotels, Hospitals, Picnic spots and most importantly fuel stations. Weather forecasting is another feature in this Application which keeps you informs what to wear at destination place. A special feature for Muslim community is added in this Application which is “locating the Kiblah direction” to offering their prayer in right direction, which is normally misjudged at unknown places.
  • 9. This page is intentionally left blank
  • 10. i TABLE OF CONTENTS Plan Your Way ( An Android Application ) Chapter 1 ....................................................................................................................................... 1 Introduction................................................................................................................................... 2 1.1 Problem Statement............................................................................................................. 2 1.2 Objectives of the project.................................................................................................... 3 1.3 Features and functionality of the proposed system ........................................................ 3 1.4 Possible areas of application:............................................................................................ 4 1.5 Hardware Requirement..................................................................................................... 4 1.6 Interface Requirement....................................................................................................... 4 1.6.1 Operating System ......................................................................................................... 4 1.6.2 Programming Language ............................................................................................... 4 1.6.3 Environment ................................................................................................................. 4 1.6.4 GUI............................................................................................................................... 4 1.6.5 Other Tools................................................................................................................... 5 1.6.6 APIs .............................................................................................................................. 5 1.6.7 Android Version ........................................................................................................... 5 1.7 Technology to be used........................................................................................................ 5 Chapter 2 ....................................................................................................................................... 6 Background ................................................................................................................................... 6 2.1 Android Operating System ............................................................................................... 7 2.2 Why Android?.................................................................................................................... 7 Open Platform/ Manufacturer independent ......................................................................... 7 Three-tire Structure.............................................................................................................. 7 Rapid improvement.............................................................................................................. 8 Development Language options .......................................................................................... 8
  • 11. ii License Free......................................................................................................................... 8 Ease in Application Development ....................................................................................... 8 Popularity............................................................................................................................. 8 2.3 Challenges for Android ..................................................................................................... 9 Hard to Integrate for Vendors.............................................................................................. 9 Performance Consideration.................................................................................................. 9 Too Much Google Dependent.............................................................................................. 9 2.4 Limitations and constraints:............................................................................................. 9 Internet ............................................................................................................................... 10 Weather.............................................................................................................................. 10 Vehicles.............................................................................................................................. 10 2.5 Android in Future:........................................................................................................... 10 Chapter 3 ..................................................................................................................................... 11 Features and Design.................................................................................................................... 11 3.1 Features and Design Description.................................................................................... 12 3.1.1 Find shortest path to destination................................................................................. 12 3.1.2 Highlight Places of interest......................................................................................... 13 3.1.3 Compass for kiblah direction...................................................................................... 14 3.1.4 Maintaining History.................................................................................................... 14 Chapter 4 ..................................................................................................................................... 15 Components and Architecture................................................................................................... 15 4.1 Basic Architecture............................................................................................................ 16 4.2 Hardware & Other Components.................................................................................... 17 4.3 Google Data Base and API`s........................................................................................... 18 4.3.1 Map API ..................................................................................................................... 18 4.3.2 Places and Direction API............................................................................................ 18 Chapter 5 ..................................................................................................................................... 19 Methodology................................................................................................................................ 19 5.1 Data Flow.......................................................................................................................... 20 5.2 JSON (Java Script Object Notation).............................................................................. 20 5.3 Geo Coding and Reverse Geo Coding............................................................................ 21
  • 12. iii 5.4 Interface and Information Exchange............................................................................. 21 5.5 Data Base File Handling and API`s................................................................................ 21 Chapter 6 ..................................................................................................................................... 23 Implementation ........................................................................................................................... 23 6.1 Using the On-Device GPS................................................................................................ 24 6.2 Calculating Distance between Two Points..................................................................... 24 6.3 Finding the interested places........................................................................................... 25 6.4 Finding the Qibla direction............................................................................................. 26 Chapter 7 ..................................................................................................................................... 27 Results.......................................................................................................................................... 27 Warnings for Internet Connection ...................................................................................... 28 Main Menu.......................................................................................................................... 28 Get Direction Activities...................................................................................................... 28 When Universities is selected from drop down menu ........................................................ 29 Interested Places Activities................................................................................................. 29 When Hospital is selected from drop down menu.............................................................. 30 Qibla Direction Activity ..................................................................................................... 30 References.................................................................................................................................... 31 Web sites............................................................................................................................. 32 Books .................................................................................................................................. 32 Papers.................................................................................................................................. 32
  • 14. Introduction Plan Your Way [An Android Application] 2 Introduction “Plan your way” is an application for Smart Mobile devices operates on Android operating system. Which provides Location based services; using android GPS, the application is location aware. It keeps track of the user location in real time this application will be able to find and present the shortest path between different possible paths from current location to specified location. Basically it can be used for minimizing the cost of time and fuel further it provides guidance to unknown person going to their destination. Th1is Application is able to highlights important places like Hotels, Hospitals, Picnic spots and most importantly fuel stations. Weather forecasting is another feature in this Application which keeps you informs what to wear at destination place. A special feature for Muslim community is added in this Application which is “locating the Kiblah direction” to offering their prayer in right direction, which is normally misjudged at unknown places. 1. This project can be used for Guidance purpose which will guide you about your destination by finding the shortest path, keeps you inform about places of interest between the paths. 2. Energy Efficient; This Application leads you to the right way with minimum time and cost. 3. Tourism; for planning trips and tours. 4. Self-tracking when you get lost at unknown place. 1.1 Problem Statement The following problem statement briefly defines the boundaries and environment of this project: An android application, which has the capability of location awareness, collects the virtual information of user’s surroundings, by detecting and tracking user’s location in real time.
  • 15. Introduction Plan Your Way [An Android Application] 3 Using the GPS the application is fully location aware which keeps the track of user's location. When the user move towards specific location, the application tracks the movement and displays the current location. Then the application keeps on updating the information as the place changes. According to user query it displays the shortest path to destination or displays important places near to the current location like Hospital, Universities, Shops, Fuel Stations.., etc. The additional information is displayed with the help of "Google" databases which helps the users to interact in a more reliable way. Option for viewing the places in normal Google Map view as well as Satellite View is also available. 1.2 Objectives of the project Main objectives are:- Primary objectives: a) Find shortest Driving path to destination. b) Highlight Places of interest like Picnic spots, Popular Hotels and Fuel stations etc. (Provided with Option for viewing places in Satellite View as well as Normal Google Map View) Secondary Objectives: a) Maintaining the history of user activity. b) Compass for kiblah direction. c) Weather forecast of Destination place. 1.3 Features and functionality of the proposed system The proposed system requires smart device, a mobile phone with GPS Technology. Basic architecture of the system is that a mobile phone having internet connectivity with Wi-Fi or GPRS. On launching the application mobile get the co-ordinates of current location using build in GPS device or from internet, which is used for finding the path to destination (destination co- ordinates are input to the system). For other feature of Application some queries are required which are executed according to user input.
  • 16. Introduction Plan Your Way [An Android Application] 4 1.4 Possible areas of application:  This project can be used for Guidance purpose which will guide you about your destination by finding the shortest path, keeps you inform about weather and places of interest between the paths.  Energy Efficient; This Application leads you to the right way with minimum time and cost.  Tourism; for planning trips and tours.  Self-tracking when you get lost at unknown place. 1.5 Hardware Requirement  A PC (Personal Computer) having Windows 7 Operating System  Mobile phone having Android Operating System with GPS Technology  Emulator (Virtual Mobile Phone) 1.6 Interface Requirement 1.6.1 Operating System The platform used for development of this project is Windows 7 Operating system. 1.6.2 Programming Language Java and XML is used as a development language. 1.6.3 Environment Eclipse (v22.0.5-757759) 1.6.4 GUI The GUI (Graphical User Interface) is designed in eclipse using XML
  • 17. Introduction Plan Your Way [An Android Application] 5 1.6.5 Other Tools Java JDK (Java Development Kit) Android SDK (Software Development Kit) Etc. 1.6.6 APIs Google Maps API, Places API, Direction API, has also been used in the development of this application 1.6.7 Android Version Minimum requirement for android version of this application is v. 2.3.4. Target version is 4.1.2 Jelly Bean. 1.7 Technology to be used i. ADT Bundle (Android Development Toolkit) ii. Android SDK iii. API`s ( Google Map API, Location API, Direction API) iv. Smartphone with Wi-Fi and GPS Device v. Google Online Database
  • 19. Background Plan Your Way [An Android Application] 7 2.1 Android Operating System There is a lot of advancement in the OS (Operating Systems) since the last few decades. When we look at the early stages of the cell phones, the black and white phones were came into focus but with the passage of time, cell phones were pushed onto the next level and now smart phones are particularly in focus. Mobile OS has come into horizon. In past Symbian and Java Operating System were used for Mobile devices but a revolution came in mobile industry. The operating systems for smart phones & tablets, there was a need of change, so after the year 2000 the OS like Android and Blackberry were urbanized (came into existence). With the passage of time, among all the greatest and widely used mobile operating systems there was android. Android Inc. was founded in Palo Alto of California, U.S. by Andy Rubin, Rich miner, and Chris White in early 2000. Then later on in 2005 Android was picked up by Google. With the advancement in Android OS, numerous versions were introduced. After that there have been number of updates are still coming in order to satisfy the user need perfectly. Android Operating System gives the flexibility for both (users & developers). 2.2 Why Android? The Key reasons that forced us to choose Android were:  Open Platform/ Manufacturer independent Android is not constraint to any maker, so it allows us to develop and change the existence of original and makes us more innovative in the development process.  Three-tire Structure For development it follows Three-tier structure which gives freedom to developers to program dynamically. XML separates the user interface from actual data and other Java
  • 20. Background Plan Your Way [An Android Application] 8 coding for function execution. So data interface and business logic remain separate which is very important for dynamic programing or when requirement changed accordingly.  Rapid improvement As the developer of Android, we have the opportunity to take the advancement to the next level. Advancement can be in any form like the OLED display in the Android cell phones.  Development Language options Many mobile applications can be developed in any language like JAVA, Perl etc. Android provides the options to interact with different languages for more productive development. Such as: XML, JAVA and other Libraries for particular functions.  License Free The license expenses does matter a lot, which is not noticeable in the Android development because of its free sourcing advantage.  Ease in Application Development Error checking and Debugging become more efficient and easy to handle. The emulator plays an important role in the testing process of any application made for android with the help of Android SDK (Software Development Kit).  Popularity With more advancement in android, it has become the most popular OS of all times as compared to others.
  • 21. Background Plan Your Way [An Android Application] 9 2.3 Challenges for Android  Hard to Integrate for Vendors When talking about the IOS, the developers have to deal with fewer complications in the developing process because of the fewer versions. The same is not the case with Android applications. There are different brands in the market offering different screen sizes and using various kinds of processors. So this makes a great deal of opportunity for the android developers to innovate something new which can be nearly compared to as a difficult task.  Performance Consideration Every device has its own way of handling itself. Different brands, offering different devices with various screen sizes and using various kinds of processors results in performance issues.  Too Much Google Dependent When talking about android, we automatically came to know that it is a lot in the handled by Google. Google makes Android a bit more terms independent which makes it much better. 2.4 Limitations and constraints: Since satellite transmission power is low, certain geographical conditions may cause problems with a GPS receiver’s ability to record location data.
  • 22. Background Plan Your Way [An Android Application] 10 Internet This Application heavily depends on Internet connection. This Application fails to work if connection is not available. Weather Signal strength can become degraded by moisture such as rainfall, fog, or snowfall. Vehicles Signals can be lost when any person is riding in a car or other enclosed means of Transportation if the receiver is not placed near a window within the vehicle. 2.5 Android in Future: The future years are going to introduce Android to a greater level. The developed applications in Android are well known by the Android users. In imminent, developers will be in a big problem in deciding their launch of first applications. The growing Android base is absolutely a positive factor. In other words, the Android Application Developers cannot fail to notice the positive response that they can earn with Android based Smartphone.
  • 24. Features and Design Plan Your Way [An Android Application] 12 Main Menu 3.1 Features and Design Description This Application provides Location based services; this application will be able to find and mark the complete path from current location to specified location. This Application uses Google API for Displaying Maps. Due to Android GPS, the application is location aware. This application facilitates those people who move from one place to another (some time to unknown place) which is used for Route guidance and location awareness. Basically it can be used for minimizing the cost of time and fuel further it provides guidance to unknown person going to their destination. This Application is able to highlights important places like Hotels, Hospitals, Picnic spots and most importantly fuel stations. Weather forecasting is another feature in this Application which keeps you informs what to wear at destination place. A special feature for Muslim community is added in this Application which is “locating the Kiblah direction” to offering their prayer in right direction, which is normally misjudged at unknown places. 3.1.1 Find shortest path to destination. Get Direction button in main menu is served to start GetDirection.java activity. Current location is automatically captured through GPS device present in smart phone by putting a marker on Map. Destination place is inputted to the system using Edit Text box. By pressing the Get Route Button on Get Direction Activity, a complete shortest path is displayed on Google Map and prompts the total distance from current location to destination. Map View can be changed to Satellite view as well as Normal
  • 25. Features and Design Plan Your Way [An Android Application] 13 View for better interaction of user with locations. 3.1.2 Highlight Places of interest Interested Places button in main menu is served to start Interested Places.java activity. It displays a list of important places like: Hospitals, Universities, picnic spots, Hotels and Restaurants, etc. if any one of those particular places is selected then all location of that particular place is presented on Map with markers. Further details about specific locationis displayed if user click/tap on particular marker and Information Window.
  • 26. Features and Design Plan Your Way [An Android Application] 14 3.1.3 Compass for kiblah direction. Qibla Direction button in main menu is served to start Qibla Direction.java activity. It gets the current coordinate and calculate the direction of qibla which is used further in displaying pointer, toward qibla , on the real time compass. By moving the mobile, the compass as well as pointer moves according to the qibla direction. 3.1.4 Maintaining History Another feature of this application is that it maintains the user history. When user tap Get Route button, a file is appended with destination place and current place name with total distance and current date. User can retrieve history by taping the history button available on GetDirection.java Activity.
  • 27. Chapter 4 Components and Architecture
  • 28. Components and Architecture Plan Your Way [An Android Application] 16 System Diagram 4.1 Basic Architecture Basic architecture for my application Plan Your Way consists of:  Three-tier Architecture E.g. Interface layer, Data Access Layer and Program Logic  Input place conversion to Coordinates and vice versa. E.g. Geo Coding and Decoding  Google Database  Mobile Hardware Devices E.g. Compass, GPS, Wi-Fi  API`s (Application Program Interface) E.g. Google Maps, Google Places, Google Direction and Google Weather API`s
  • 29. Components and Architecture Plan Your Way [An Android Application] 17 4.2 Hardware & Other Components The following picture shows the hardware & other components that I used in my project Plan Your Way.  The GPS is getting the current location of a user. The surrounding information is well known to the user when the current location is identified correctly.  Compass is getting the NEWS (North East West South) direction information.  Maps are loaded from internet and displayed on mobile device. Compass
  • 30. Components and Architecture Plan Your Way [An Android Application] 18 4.3 Google Data Base and API`s All information about places and direction is collected from already maintained database by Google Corp. Google has one of the largest but also one of the greenest data center infrastructures among the world’s companies. Google has been an industry leader in releasing information about the world which consists of places, roads, etc. 4.3.1 Map API Google Map API is used to inter link mobile phone with the world using maps. This application retrieve map from cloud and put it on screen of smart phone for user interaction with the world. This API also allow to get the input from user as he/she touch on the map and map can be animated using program logic. 4.3.2 Places and Direction API The Google Places API is a service that returns information about Places — defined within this API as establishments, geographic locations, or prominent points of interest — using HTTP requests. Place requests specify locations as latitude/longitude coordinates. The Google Directions API is a service that calculates directions between locations using an HTTP request. You can search for directions for several modes of transportation, include transit, driving, walking or cycling. Directions may specify origins, destinations and waypoints either as text strings (e.g. "Chicago, IL" or "Darwin, NT, Australia") or as latitude/longitude coordinates. The Directions API can return multi-part directions using a series of waypoints.
  • 32. Methodology Plan Your Way [An Android Application] 20 5.1 Data Flow Data flow depends on the functionality of the application either data is retrieve from internet or sent over internet in the form of query. Data also flows between different activities of application and between different layers of application such as interface and data access layer for information processing.  Get current location from GPS of mobile phone and destination place from user from interface.  Calculate Distance and Direction as well as displaying route on the Google Map.  Send query about interested places to Google Database and get the result in JSON format further which is processed and presented on the user screen.  Getting the position or rotation of mobile from Compass sensor build in the device and relatively calculating the Qibla direction from user`s current location acquired previously. 5.2 JSON (Java Script Object Notation) JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language. JSON is built on two structures:  A collection of name/value pairs. In various languages, this is realized as an object, record, dictionary, hash table, keyed list, or associative array.  An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
  • 33. Methodology Plan Your Way [An Android Application] 21 5.3 Geo Coding and Reverse Geo Coding Geocoding is the process of finding associated geographic coordinates (often expressed as latitude and longitude) from other geographic data, such as street addresses, or ZIP codes (postal codes). With geographic coordinates the features can be mapped and entered into Geographic Information Systems, or the coordinates can be embedded into media such as digital photographs via Geo tagging. Reverse geocoding is the opposite: finding an associated textual location such as a street address, from geographic coordinates. A Geo coder is an algorithm of a piece of software or a (web) service that helps in this process. 5.4 Interface and Information Exchange Different XML files are used in project for creating Screen interfaces of application. While .java files have been used for accessing these interface objects or views for displaying information on screen in some proper way or format Data exchange between XML file and Java files are in the form of Strings, so lot of string process involves in whole project. 5.5 Data Base File Handling and API`s All information about places and direction is collected from already maintained database by Google Corp. Google has one of the largest but also one of the greenest data center infrastructures among the world’s companies. Google has been an industry leader in releasing information about the world which consists of places, roads, etc. Keeping History One of the important feature of this application is that it maintains the user history. File handling is used for keeping user history. When user tap Get Route button, a file is appended with destination place and current place name with total distance and current date. User can retrieve history by taping the history button available on GetDirection.java Activity.
  • 34. Methodology Plan Your Way [An Android Application] 22 Map API Google Map API is used to inter link mobile phone with the world using maps. This application retrieve map from cloud and put it on screen of smart phone for user interaction with the world. This API also allow to get the input from user as he/she touch on the map and map can be animated using program logic. Places and Direction API The Google Places API is a service that returns information about Places — defined within this API as establishments, geographic locations, or prominent points of interest — using HTTP requests. Place requests specify locations as latitude/longitude coordinates. The Google Directions API is a service that calculates directions between locations using an HTTP request. You can search for directions for several modes of transportation, include transit, driving, walking or cycling. Directions may specify origins, destinations and waypoints either as text strings (e.g. "Chicago, IL" or "Darwin, NT, Australia") or as latitude/longitude coordinates. The Directions API can return multi-part directions using a series of waypoints.
  • 36. Implementation Plan Your Way [An Android Application] 24 6.1 Using the On-Device GPS For this location-based application, it’s crucial that we know where exactly the device located. And, for accuracy, we want the best location provider which is available on the device Applications which use any sort of location data from the device need certain location permissions. For this purpose, there are two options available. One is to use a coarse location that returns a location which is based on cellular towers or known as Wi-Fi access points. This level of result works great for determining what city we are in and maybe the locality. However, it probably won’t be able to determine which street or block you’re on correctly. The other option is to use the fine location, which uses the GPS on the device to get an accurate position. It may take a little longer, but uses GPS satellites and cellular towers to increase the location accuracy. Fine location data can be helpful for determining what side of the street we are on. It’s basically the level of accuracy and exactness that is generally used for AR apps. So the next step here will be to add permissions in the manifest file.To Listen the Location by using the Location Listener interface. It will include methods will deal with the location data when a location is changed, setting the accuracy criteria, requesting location updates, getting the best provider etc. 6.2 Calculating Distance between Two Points We are interested in the direction and route guidance from current location to destination location. In navigation, this is called the bearing. A path between two points on a spherical object, such as the planet Earth, is shortest by following what’s called the great-circle distance. By using TSP (Traveling Salesman Problem) techniques, Direction API finds shortest route between locations, this would be reasonable distance mechanism to use. As we input destination location to the system, API implement the algorithm we only need to parse the information came as an output from API. An alternate solution might be to calculate a straight line, in 3D space, between two points on the sphere. This method assumes that a path through the sphere, as opposed to around its surface, but this method is not in the least useful.
  • 37. Implementation Plan Your Way [An Android Application] 25 6.3 Finding the interested places A Nearby Search algorithm in application lets search for Places within a specified area. We can refine our search request by supplying keywords or specifying the type of Place we are searching for. A Nearby Search request is an HTTP URL of the following form:https://maps.googleapis.com/maps/api/place/nearbysearch/output?parameters where output may be either of the following values:  JSON (recommended) indicates output in JavaScript Object Notation (JSON)  xml indicates output as XML We only need to parse this information so that we used this for our specific purpose in application. E.g. To display nearby places on the Google Map using markers and other icons.
  • 38. Implementation Plan Your Way [An Android Application] 26 6.4 Finding the Qibla direction For finding Qibla direction at particular place firstly we get the current location from GPS or through cellular towers then we calculate the bearing or direction angle between the coordinates of our location towards the Qibla or Mecca coordinates. Mobile`s build in compass is used to get the value of rotation towards N, E, W, S (North East West South)poles which is used to rotate the pointer as well as compass accordingly. A user friendly menu is created in XML which is used to handle all these operations in my application “Plan Your Way”.
  • 40. Results Plan Your Way [An Android Application] 28 Main Menu Warnings for Internet Connection Get Direction Activities
  • 41. Results Plan Your Way [An Android Application] 29 Interested Places Activities Map View & SattiliteView When Universities is selected from drop down menu
  • 42. Results Plan Your Way [An Android Application] 30 When Hospital is selected from drop down menu Qibla Direction Activity
  • 44. References Plan Your Way [An Android Application] 32 Web sites http://www.lynda.com http://www.howstuffworks.com/augmented-reality.htm http://developer.android.com/guide/topics/location/index.html http://developer.android.com/training/articles/security-tips.html Books Beginning Android™ Application Development by Wei-Meng Lee Android Programming Tutorials by Mark L. Murphy Papers Boris V. Cherkassky , Andrew V. Goldberg , Tomasz Radzik, Shortest paths algorithms: theory and experimental evaluation, Mathematical Programming: Series A and B, v.73 n.2, p.129-174, May 31, 1996 [doi>10.1007/BF02592101] Pettie, S., Ramachandran, V., Sridhar, S.: Experimental evaluation of a new shortest path algorithm. In: Mount, D.M., Stein, C. (eds.) ALENEX 2002. LNCS, vol. 2409, pp. 126–142. Springer, Heidelberg (2002)