end of year project report
TRANSCRIPT
End Of Year Project Tracking Mobile
1
Acknowledgements
First and foremost, we would like to thank our supervisor for this project,
Ms. Sana BEN FADHEL for the valuable guidance and advice. She inspired us
greatly to work in this project. Her willingness to motivate us contributed
tremendously to our project. We also would like to thank her for showing us
some examples that related to the topic of our project.
In addition, our deepest thanks to our linguistic supervisor Ms. Ines
HAJRI for the valuable advice and support she has given us in the writing of this
report.
Besides, we would like to thank the authority of our University (ESPRIT)
for providing us with a good environment and facilities to complete this project.
Finally, an honorable mention goes to our families and friends for their
understandings and supports in completing this project.
Without help of the particular that are mentioned above, we would have
faced many difficulties while doing this project.
End Of Year Project Tracking Mobile
2
ABSTRACT
A GPS (Global Positioning Satellite) tracking system works by locating a person via
satellite and sending the position to a mobile phone, personal computer or a call center.
The purpose of this project is to design a GPS Tracking application, which can be used in
different domains (to follow persons, vehicles…).
The concept of this project is based on the use of a cell phone which accepts to receive GPS
coordinates and send them to a server able to record them. Then from a web client, the
administrator can follow registered user (tracked person) on a map.
The development of the mobile application was based on J2ME technology. The web
application was developed with PHP/MySQL.
This report presents in detail, all required steps to realize the project.
Key words
GPS, tracking, mobile, J2ME, PHP, MySQL.
End Of Year Project Tracking Mobile
3
Table of content
Acknowledgements .................................................................................................................... 1
ABSTRACT ............................................................................................................................... 2
List of figures ............................................................................................................................. 6
General Introduction .................................................................................................................. 9
Chapter1: State of the art .......................................................................................................... 11
Introduction .......................................................................................................................... 11
I. Some basic concepts ...................................................................................................... 11
I.1. Geo-location .............................................................................................................. 11
I.1.1. Localization technologies ................................................................................... 11
I.1.1.3. Localization systems comparison ................................................................... 18
I.2. GPRS ......................................................................................................................... 18
I.2.1. Definition ........................................................................................................... 18
I.2.2. GPRS device classes .......................................................................................... 19
I.3. Online mapping services ........................................................................................... 20
I.3.1. MapQuest ......................................................................................................... 20
I.3.2. Yahoo Maps ..................................................................................................... 21
I.3.3. Google Maps ................................................................................................... 21
II. Survey of the existing ................................................................................................ 22
III. Project presentation ................................................................................................... 23
III.1. Main issue .............................................................................................................. 23
III.2. The proposed solution ............................................................................................ 24
Conclusion ............................................................................................................................ 25
Chapter 2 Software development methodology and project planning ..................................... 26
Introduction .......................................................................................................................... 26
I. Agile Methodologies ..................................................................................................... 26
II. Mobile-D: A methodology for the development of mobile applications: ................. 28
II.1. Mobile-D introduction: ...................................................................................... 28
II.2. Why Mobile-D for mobile application? ............................................................. 28
II.3. Mobile-D in details: ........................................................................................... 29
II.4. Mobile-D methodology evaluation: ................................................................... 31
III. Project planning ......................................................................................................... 31
End Of Year Project Tracking Mobile
4
Conclusion ............................................................................................................................ 33
Chapter 3 Project requirements analysis .................................................................................. 34
Introduction .......................................................................................................................... 34
I. Project requirements ...................................................................................................... 34
I.1. Actors ..................................................................................................................... 34
I.2. Functional requirements ......................................................................................... 34
I.3. Nonfunctional requirements ................................................................................... 35
II. Requirement analysis ................................................................................................. 35
II.1. Choice of methodology ...................................................................................... 35
II.2. Application use case ........................................................................................... 36
II.2.1. Mobile application .............................................................................................. 37
II.2.2. Web application .................................................................................................. 39
II.3. Analysis Class diagram ...................................................................................... 40
II.4. State machine ..................................................................................................... 41
Conclusion ............................................................................................................................ 41
Chapter 4 Design ...................................................................................................................... 42
Introduction .......................................................................................................................... 42
I. General Design ................................................................................................................. 42
I.1. System context Description ....................................................................................... 42
I.1.1. Context diagram ..................................................................................................... 42
I.1.2. Activity diagram .................................................................................................... 43
I.2. General View ............................................................................................................. 45
II. Detailed design ................................................................................................................. 47
II.1. Sequence diagram ...................................................................................................... 47
II.2. Class diagram ............................................................................................................ 48
II.2.1. MIDlet .................................................................................................................... 48
II.2.2. Package: Controller ................................................................................................ 49
II.2.3. Package: View ....................................................................................................... 50
II.2.4. Package: Model ...................................................................................................... 51
II.2.5. Package: Utils ........................................................................................................ 51
II.2.6. Package: Service .................................................................................................... 52
II.3. Entity Relationship Diagram ..................................................................................... 53
Conclusion ............................................................................................................................ 53
End Of Year Project Tracking Mobile
5
Chapter 5 Implementation ........................................................................................................ 54
Introduction .......................................................................................................................... 54
I. Work environment ......................................................................................................... 54
I.1. Programming languages ......................................................................................... 54
I.2. Location API for Java ME ..................................................................................... 58
I.3. Software environment ............................................................................................ 59
II. Realization ................................................................................................................. 60
II.1. Mobile application .............................................................................................. 60
II.2. Web application .................................................................................................. 63
Conclusion ............................................................................................................................ 68
Conclusion and future work ..................................................................................................... 69
Appendix A: Mobile-D phases ................................................................................................. 71
References and bibliography .................................................................................................... 76
Tracking Mobile: .................................................................................................................. 42
Mobile application ................................................................................................................ 42
Web Server ........................................................................................................................... 43
End Of Year Project Tracking Mobile
6
List of figures
Figure 1 Geo-location ............................................................................................................... 11
Figure 2 Cell-ID ....................................................................................................................... 12
Figure 3 Cell-ID+TA ................................................................................................................ 13
Figure 4 TDOA Localization ................................................................................................... 14
Figure 5 GPS Satellites ............................................................................................................ 14
Figure 6 Receiver position on the periphery of the sphere ...................................................... 16
Figure 7 Receiver position on the periphery of the grey circle ................................................ 17
Figure 8 Receiver position on the sphere and cercle intersection ............................................ 17
Figure 9 Internet access overs GPRS ....................................................................................... 19
Figure 10 Weenee by Tunisiana ............................................................................................... 22
Figure 11 Global architecture ................................................................................................... 24
Figure 12Mobile-D ................................................................................................................... 29
Figure 13 Mobile-D phases ...................................................................................................... 30
Figure 14 Gantt Chart ............................................................................................................... 33
Figure 15 UML ......................................................................................................................... 36
Figure 16 General Use case ...................................................................................................... 36
Figure 17 Mobile Use case ....................................................................................................... 37
Figure 18 Web Use case ........................................................................................................... 39
Figure 19 Analysis class diagram ............................................................................................. 40
Figure 20 State machine diagram ............................................................................................. 41
Figure 21 Context diagram ....................................................................................................... 43
Figure 22 Mobile side: Activity diagram ................................................................................. 44
Figure 23 Web site: Activity diagram ...................................................................................... 45
Figure 24 : Different packages of the application .................................................................... 46
Figure 25 Mobile side: Sequence diagram ............................................................................... 47
Figure 26 Web site: Sequence diagram .................................................................................... 48
Figure 27 MIDlet class ............................................................................................................. 48
Figure 28: Controller package .................................................................................................. 49
Figure 29 Package View .......................................................................................................... 50
Figure 30 Package Model ......................................................................................................... 51
Figure 31 Package Utils ........................................................................................................... 51
Figure 32 Package Service ....................................................................................................... 52
Figure 33 Entity relationship diagram ...................................................................................... 53
Figure 34JavaME architecture ................................................................................................. 55
Figure 35 Mobile login interface .............................................................................................. 61
Figure 36 Mobile menu interface ............................................................................................. 61
Figure 37 Mobile set options interface ..................................................................................... 62
Figure 38 Mobile show position interface ................................................................................ 62
Figure 39 Web login interface .................................................................................................. 64
Figure 40 Web menu interface ................................................................................................. 64
Figure 41 Web search by user interface ................................................................................... 65
End Of Year Project Tracking Mobile
7
Figure 42 Web Real time map .................................................................................................. 66
Figure 43 Web search by date interface ................................................................................... 67
Figure 44 Web map interface ................................................................................................... 68
Figure 45 Mobile-D Explore .................................................................................................... 71
Figure 46 Mobile-D initialize ................................................................................................... 72
Figure 47 Mobile-D productionize ........................................................................................... 73
Figure 48 Mobile-D Stabilize ................................................................................................... 74
Figure 49 Mobile-D Test .......................................................................................................... 74
Figure 50 Mobile-D Test&Fix ................................................................................................. 75
End Of Year Project Tracking Mobile
8
List of tables
Table 1 Localization system comparison ................................................................................. 18
Table 2 GPRS classes ............................................................................................................... 20
Table 3 MapQuest .................................................................................................................... 21
Table 4 Yahoo Maps ................................................................................................................ 21
Table 5 Google Maps ............................................................................................................... 21
Table 6 Comparision between agile methodologies ................................................................ 27
Table 7 Mobile-D and mobile software development characteristics ...................................... 29
Table 8 Use case: Set options ................................................................................................... 37
Table 9 Use case: Show position .............................................................................................. 38
Table 10 Use case: Send position ............................................................................................. 38
Table 11 Use case: Follow tracks in real time.......................................................................... 39
Table 12 Use case: Search for a track ...................................................................................... 40
Table 13 Mobile-D Explore ..................................................................................................... 71
Table 14 Mobile-D initialize .................................................................................................... 72
Table 15 Mobile-D productionize ............................................................................................ 73
End Of Year Project Tracking Mobile
9
General Introduction
Since its appearance the computer science is in constant evolution and became an
engine for development and growth for companies.
During these years, new technologies have emerged (embedded computing, wireless
networks, the geo-location...) and also new devices (PDA, smart phones, mobile phones ...)
with more compact size, performance and higher capabilities.
The rise of technology mainly affects networks and mobile phones, and that success
leads to the development of many services in many areas.
Mobile phones applications become increasingly popular due to their practical aspects.
Today, the major business applications have a mobile component and PDA clients;
mobile phones are increasingly in demand.
Users become more mobile and want access to their information from any location.
Mobile telecommunications related to the GPS is in rapid increase due to the
performance of mobile terminals and autonomous GPS, which represents now the digital
equipment registering the fastest rate of adoption by the general public in recent years.
This project aims to develop a web application for monitoring and tracking mobile
phones for surveillance, security, tracking goods or vehicles in real time, and the development
of Mobile application deployed on the mobile phone of the tracked person. The
communication between the two applications will be remotely done via GPRS (General
Packet Radio Service).
This report presents the main facets of the design and implementation of an
application of real-time tracking of mobile phones.
After presenting the stat of the art (Chapter 1), we will introduce the purpose of this
project, detail the objectives and requirements of this product in the section devoted to the
presentation and analysis of problems (Chapter 2).
End Of Year Project Tracking Mobile
10
Then we will introduce the methodology we will use in our project (Chapter 3).
The design of the application is the subject of the next chapter called design solution
that explains the architecture of the proposed solution (Chapter 4).
The last chapter will be devoted to technical details of the development,
the working environment and the test of the application (Chapter 5).
Finally the general conclusion summarizing the main results obtained and the major
problems and prospects for this project.
End Of Year Project Tracking Mobile
11
Chapter1: State of the art
Introduction
In this chapter, present concepts and technologies, needed in our project. First of all, we
will talk about the context of our project which is geo-location then introduce some
localization technologies like GPS, GSM… next, we will present GPRS. Finally we will deal
with online mapping services.
Then we will begin our project study, by presenting the project, the main issue and our
proposed solution.
I. Some basic concepts
I.1. Geo-location
―The science of geolocation is concerned with the methods and concepts used to locate
objects and features on the Earths surface, and in nearby space with respect to a terrestrial coo
rdinate system.‖ [1]
Figure 1 Geo-location
I.1.1. Localization technologies
Localization technologies define the position of a mobile phone. Several families of
positioning methods can be defined: the mobile network and technologies based on the GPS-
based technologies
Principal technologies used for geo-location are:
End Of Year Project Tracking Mobile
12
GPS
GSM, UMTS
Wi-Fi, Bluetooth
RFID
Internet
In what follows we will detail two of these technologies which are GSM and GPS and
compare them.
I.1.1.1. GSM network
In the mobile network-based solutions, the position is determined by the mobile
network which calculates the position of the terminal.
I.1.1.1.1. Cell-ID
A Cell-ID is the unique number of a GSM cell for a given operator. Your
phone is always connected to a Cell, and by knowing this number, you know the Cell,
and by knowing the position of the cell, you know where you are. There is some
accuracy issue, as the cell can cover from several hundreds of meters to several
kilometers, but this could be a very good starting point to locate yourself. [2]
Figure 2 Cell-ID
End Of Year Project Tracking Mobile
13
I.1.1.1.2. Cell-ID+TA (Time Advanced)
The Cell-ID method described above can be enhanced by the use of different
data and in particular further measures, measuring the spread, time itself proportional
to the distance between the base station and the mobile feature.
Figure 3 Cell-ID+TA
I.1.1.1.3. TOA (Time of Arrival) and TDOA (Time Difference of
Arrival)
Time of Arrival (TOA or ToA), also named Time of flight (ToF), which both means
the travel time of a radio signal from a single transmitter to a remote single receiver. By the
relation between light speed in vacuum and the carrier frequency of a signal the time is a
measure for the distance between transmitter and receiver. However, in some publications the
fact is ignored, that this relation is well defined for vacuum, but is different for all other
material when radio waves pass through.
Similar to the TDOA technique, this Time of arrival called technology only differs in the
fact that it uses the absolute time of arrival at a certain base station rather than the measured
time difference between departing from one and arriving at the other station. The distance can
be directly calculated from the time of arrival as signals travel with a known velocity. Time of
arrival data from two base stations will narrow a position to two circles and data from a third
base station is required to resolve the precise position with the third circle when matching in a
single point. There are many ToA-based localization systems, including GPS. [3]
End Of Year Project Tracking Mobile
14
Figure 4 TDOA Localization
I.1.1.2. GPS system
I.1.1.2.1. Definition
The Global Positioning System (GPS) is a U.S. space-based global navigation satellite
system. It provides reliable positioning, navigation, and timing services to worldwide users on
a continuous basis in all weather, day and night, anywhere on or near the Earth which has an
unobstructed view of four or more GPS satellites.
Figure 5 GPS Satellites
End Of Year Project Tracking Mobile
15
GPS is made up of three segments: Space, Control and User. The Space Segment is
composed of 24 to 32 satellites in Medium Earth Orbit and also includes the boosters required
to launch them into orbit. The Control Segment is composed of a Master Control Station, an
Alternate Master Control Station, and a host of dedicated and shared Ground Antennas and
Monitor Stations. The User Segment is composed of hundreds of thousands of U.S. and allied
military users of the secure GPS Precise Positioning Service and tens of millions of civil,
commercial and scientific users of the Standard Positioning Service (see GPS navigation
devices). GPS satellites broadcast signals from space that GPS receivers use to provide three-
dimensional location (latitude, longitude, and altitude) plus precise time.
GPS has become a widely used aid to navigation worldwide, and a useful tool for
map-making, land surveying, commerce, scientific uses, tracking and surveillance, and
hobbies such as geocaching and way marking. Also, the precise time reference is used in
many applications including the scientific study of earthquakes and as a time synchronization
source for cellular network protocols.
GPS has become a mainstay of transportation systems worldwide, providing
navigation for aviation, ground, and maritime operations. Disaster relief and emergency
services depend upon GPS for location and timing capabilities in their life-saving missions.
The accurate timing that GPS provides facilitates everyday activities such as banking, mobile
phone operations, and even the control of power grids. Farmers, surveyors, geologists and
countless others perform their work more efficiently, safely, economically, and accurately
using the free and open GPS signals. [4]
I.1.1.2.2. Basic concepts of GPS:
A GPS receiver calculates its position by precisely timing the signals sent by the GPS
satellites high above the Earth. Each satellite continually transmits messages which include
The time the message was transmitted
Precise orbital information (the ephemeris)
The general system health and rough orbits of all GPS satellites (the almanac).
The receiver utilizes the messages it receives to determine the transit time of each
message and computes the distances to each satellite. These distances along with the satellites'
locations are used with the possible aid of trilateration to compute the position of the receiver.
End Of Year Project Tracking Mobile
16
This position is then displayed, perhaps with a moving map display or latitude and longitude;
elevation information may be included. Many GPS units also show derived information such
as direction and speed, calculated from position changes.
Three satellites might seem enough to solve for position, since space has three
dimensions and a position on the Earth's surface can be assumed. However, even a very small
clock error multiplied by the very large speed of light—the speed at which satellite signals
propagate—results in a large positional error. Therefore receivers use four or more satellites
to solve for the receiver's location and time. The very accurately computed time is effectively
hidden by most GPS applications, which use only the location. A few specialized GPS
applications do however use the time; these include time transfer, traffic signal timing, and
synchronization of cell phone base stations.
Although four satellites are required for normal operation, fewer apply in special
cases. If one variable is already known, a receiver can determine its position using only three
satellites. (For example, a ship or plane may have known elevation.) Some GPS receivers may
use additional clues or assumptions (such as reusing the last known altitude, dead reckoning,
inertial navigation, or including information from the vehicle computer) to give a degraded
position when fewer than four satellites are visible. [4]
I.1.1.2.2.1. Position calculation introduction
The method used is the triangulation, at least three satellites are therefore necessary.
The first allows you to reduce the possible positions of the receiver on the
periphery of a sphere. The RADIUS is the computed X distance and the
center being the position of the first satellite.
Figure 6 Receiver position on
the periphery of the sphere
End Of Year Project Tracking Mobile
17
The second satellite will reduce the position of the receiver to the
circumference of a circle at the intersection of the second sphere. The
second being the new RADIUS distance is calculated.
The third satellite can reduce the receiver position has only two points
through the intersection between the new sphere and the circumference of
the circle calculated earlier. The third being the new RADIUS distance
calculated.
The correct position for the GPS receiver is also the intersection closest to
the surface of the sphere corresponding to the fourth satellite. [5]
I.1.1.2.2.2. Correcting a GPS receiver’s clock
The method of calculating position for the case of no errors has been explained. One
of the most significant error sources is the GPS receiver's clock. Because of the very large
value of the speed of light, c, the estimated distances from the GPS receiver to the satellites,
the pseudo ranges, are very sensitive to errors in the GPS receiver clock. This suggests that an
extremely accurate and expensive clock is required for the GPS receiver to work. On the other
Figure 7 Receiver position on the
periphery of the grey circle
Figure 8 Receiver position on the
sphere and cercle intersection
End Of Year Project Tracking Mobile
18
hand, manufacturers prefer to build inexpensive GPS receivers for mass markets. The solution
for this dilemma is based on the way sphere surfaces intersect in the GPS problem. [5]
I.1.1.3. Localization systems comparison
The following table to compare different localization technologies retaining two
important parameters: the degree of precision and the implementation cost infrastructure and
mobile terminals.
Technologies Precision Advantages Disadvantages
Cell ID 250m - 10 Km low price Low precision
Cell ID+TA 100m - 500m Good precision Deployment of antenna needed
(High price)
GPS 5m - 10 m Exact position GPS receiver needed &
Problems for indoor positions
Table 1 Localization system comparison
The choice of a technology rather than another one is based on its precision. We
should in fact, compare this technology with the services you want to propose and user needs
or expectations in terms or accuracy. We must also take into account the availability of
content.
I.2. GPRS
After presenting localization technics, we will now talk about GPRS. What is GPRS?
I.2.1. Definition
GPRS (General Packet Radio Service) is a method of enhancing 2G phones to enable
them to send and receive data more rapidly. With a GPRS connection, the phone is "always
on" and can transfer data immediately, and at higher speeds: typically 32 - 48 kbps. An
additional benefit is that data can be transferred at the same time as making a voice call.
GPRS is now available on most new phones.
GPRS is part of a series of technologies that are designed to move 2G networks closer to
the performance of 3G networks. The key characteristic of a 3G network is its ability to
transfer large amounts of data at high speed (up to 2 Mbps), enabling applications like video
calling, video downloads, web browsing, email, etc. By increasing the speed of a 2G network,
some of these applications become possible, e.g. web browsing and sending or receiving
End Of Year Project Tracking Mobile
19
emails with large attachments. These technologies are called 2.5G and include enhancements
to the CSD technology, such as HSCSD and EDGE. [6]
Figure 9 Internet access overs GPRS
One may use a mobile phone, PDA, or notebook to connect to a GPRS network. A
mobile phone can be used as a GPRS modem too by linking it with computer using Bluetooth,
infrared, or serial cable.
I.2.2. GPRS device classes
The class of a GPRS phone determines the speed at which data can be transferred.
Technically the classes refer to the number of timeslots available for upload (sending data
from the phone) or download (receiving data from the network). The timeslots used for data
are in addition to the slot that is reserved for voice calls. These timeslots are available
simultaneously, so the greater the number of slots, the faster the data transfer speed. Because
GPRS transmits data in packets, the timeslots are not in use all the time, but are shared
amongst all users of the network. That increases the overall data capacity of the network, and
it also means that you are billed for the quantity of data transmitted, not the time that you are
online. It may mean that during busy times, data transfer rates slow down, because the
network will give priority to voice calls. [6]
End Of Year Project Tracking Mobile
20
The most common GPRS classes in use are as follows:
GPRS Class Slots Max. data transfer speed
Class 2 3 8 - 12 kbps upload / 16 - 24 kbps download
Class 4 4 8 - 12 kbps upload / 24 - 36 kbps download
Class 6 4 24 - 36 kbps upload / 24 - 36 kbps download
Class 8 5 8 - 12 kbps upload / 32 - 40 kbps download
Class 10 5 16 - 24 kbps upload / 32 - 48 kbps download
Class 12 5 32 - 48 kbps upload / 32 - 48 kbps download
Table 2 GPRS classes
Generally speaking, the higher the GPRS class, the faster the data transfer rates.
I.3. Online mapping services
Online mapping has come a long way in the last year. Google Maps entered the field and
added satellite imagery to spring itself into the spotlight – challenging the colorful cartoon-
like map images of longtime mapping frontrunner MapQuest. The Google Maps API enabled
developers to create new applications and Mashups, thereby pushing the Google Maps brand
to mainstream audiences. Google Maps, Yahoo Maps and MapQuest, are the online mapping
the most used everywhere; we will look at all them and examine their features and
performance. [7]
I.3.1. MapQuest
Advantages Disadvantages
Very good map detail, with fair
readability.
Initial map scale can be specified (but
only as one of ten zoom levels).
Offers driving directions to or from
the mapped location.
Automatically capitalizes street and
city names.
Only one location per map can be
specified.
Only one style of icon is available for
initial specification, and it cannot be
labeled.
Maps cannot be embedded in pages--
only map links are available.
Map size cannot be controlled.
Map is labeled only by the address
associated with the icon.
No pre-specified customization can
be done
Does not automatically capitalize
country names
Advertising sometimes creates popup
End Of Year Project Tracking Mobile
21
windows, which will annoy some
visitors if not blocked.
Table 3 MapQuest
I.3.2. Yahoo Maps
Advantages Disadvantages
Excellent map detail and readability.
Map page is moderately fast to load.
Offers driving directions to or from the
mapped location.
Only one location per map can be
specified, and that must be done by street
address.
Only one style of icon is available.
Maps cannot be embedded in pages--only
map links are available.
Map is labeled only by the address
associated with the icon.
Map size and initial scale cannot be
controlled.
Table 4 Yahoo Maps
I.3.3. Google Maps
Advantages Disadvantages
Excellent map detail and readability.
Maps are available worldwide.
Overlays of aerial photography are
optional.
Uses a software technology which enables
dynamic changes to a map without reloading
the entire Webpage. (Panning is especially
smooth.)
Works with only a few Web browsers
(though those are among the most popular).
Displaying more than one point per map
requires sophisticated programming
techniques using the API.
Graphical interface does not reveal lat/lon
of search results (though that can be found
from a custom map which uses the API; but
then the search feature is not available).
The level of detail in the maps varies
widely by country.
Table 5 Google Maps
Based on this comparison and according to our needs, we chose Google map for its precision
and worldwide availability.
End Of Year Project Tracking Mobile
22
II. Survey of the existing
There are already a lot of applications in the world which use the geo-positioning. We
will focus on what Tunisia is offering.
Weenee by Tunsiana
Tunisiana have released the first Tunisian GPS solution called ―Weenee‖ because it
was really time to catch up in this area.
Figure 10 Weenee by Tunisiana
Here are the features and services provided with this GPS:
Coverage: all Tunisia
Voice guidance
Display 2D and 3D mapping
Multilingual: Tunisian, German, English, Arabic, Spanish, French, Italian and
Portuguese
Finding proximity points of Interest, sorted by distance
Address Lookup throughout Tunisia
Automatic Route Recalculation
Calculation of optimized routes (time / distance)
Favorites and last recorded addresses
Alerts when speeding (Hotels, restaurants, gas stations, etc...)
But this solution can’t be used for tracking, it just inform you of your current position, and
guide you to reach your destination
End Of Year Project Tracking Mobile
23
GPS Tracking by Tunisie Telecom
After the solution proposed by Tunisiana, Tunisie Telecom offers a GPS Tracking
solution, this is an innovative mobile solution for companies wishing to manage and monitor
their fleets of vehicles (cars, boats, trucks, trailers, ...) and this at a location system involving
satellite technology (GPS) and mobile (GPRS).
With this solution, the company benefits from services with high added value such as:
The real-time visualization of the park on a mapping system.
The speed control for each vehicle
The display of routes and stops of each vehicle
Reports generation
The service is available in GSM blankets, more than 99% of the Tunisian population.
We can notice that, unlike the rest of the world, the list of geo-positioning solutions in Tunisia
is not huge.
III. Project presentation
After presenting some existing geo-positioning solutions in Tunisia, we will turn now to
an overview of our project.
III.1. Main issue
Security is very important in some activities, whether for the safety of persons or
equipment.
Having the possibility to follow physically the position of a person during a road trip can
be comfortable for family, relatives or others. Accidents do happen and you’ll be safer by
enabling others to keep tabs on you, just in case.
Also some enterprises need to follow trucks carrying their goods, to intervene in case of
breakdown or accident.
So we can notice the importance of a GPS tracking application showing a real-time
position.
End Of Year Project Tracking Mobile
24
III.2. The proposed solution
This project is meant to propose a simple and portable solution for people to get trace. The
application is web based and should be available for every people who have the possibility to:
1. Run a small Java application on its mobile phone.
2. Has link between a GPS device and its mobile phone.
3. Has Internet access.
As mentioned above, this concept is not new and some applications involving GPS are
available on the market, but, the concept to this project is a bit different. We are not focusing
on "where are we?" but more on "where he/she is?‖ For this the idea is to use a cell phone
which accepts to receive GPS coordinates and send them to a server able to record them under
the account of a register user (tracked person). Then from a web application, the user can be
followed on a map in real time mode.
So, we will develop an application that uses a cell phone with integrated GPS, which
receives and records the coordinates of the tracked person.
Tracks can be uploaded to a web site and the server side application receives the GPS data
from the mobile application and processes it (drawing track via Google maps).
The web administrator will be able to follow every tracked person in real time or just
search for a track by specifying the name of the tracked person and the period of his travel.
Figure 11 Global architecture
End Of Year Project Tracking Mobile
25
Conclusion
In this chapter, we made a bibliography about what we will need in this project to
better understand their use.
In the next chapter, we will pass to the project analysis.
End Of Year Project Tracking Mobile
26
Chapter 2 Software development methodology
and project planning
Introduction
Currently, there are several methods for software development. It is called the agile
methods. This chapter aims to present and compare these methods and will introduce the
methodology used for the planning of our project.
I. Agile Methodologies
The "agile methods" are designed to reduce lifecycle software by developing a minimum
version, then integrating the functions through an iterative process based on listening the
customer and tests throughout the development cycle.
The origin of agile methods is related to the instability of the technological environment
and the fact customers are often unable to define their needs comprehensively from the
beginning of the project. The term "agile" is referring to the ability to adapt to context
switches and changes in specifications during the intervening development process. In 2001,
17 people started and developed the Agile Manifesto whose translation is as follows:
Individuals and interactions rather than processes and tools.
Software development rather than exhaustive documentation.
Collaboration with the client rather than contract negotiation.
Openness to change rather than following a rigid plan.
With agile methods, the client is the full driver of his project and obtains very quickly
the result of his software.
End Of Year Project Tracking Mobile
27
Comparison between agile methodologies
Methodology Key points Characteristics Imperfections
RUP
(Rational
Unified
Process)
Complete model of
software
development,
includes support
tools. Task of role-
led activity.
Modeling business,
supporting tools.
RUP has no use
limits.
Lack of explanation:
how to reduce, how
to change.
XP
(Extreme
Programming)
Reduced
development per
client, small team
and daily
construction.
Refactoring - Have
to remake the system
design continuously
to improve
performance and
response to change.
Individual practices
are appropriate in
many situations but
management
practices are less
careful.
FDD
(Feature
Driven
Development)
Process with 5 steps,
development based
on object-oriented
components. Very
small iteration: from
hours to 2 weeks
The simplicity of
methods, conception
and implementation
characteristics,
And object modeling
FDD only focuses on
the conception and
implementation.
AM
(Agile
Modeling)
Agile principles to
model agile culture,
work organization
and simplicity.
Agile thinking is
also applied to
modeling.
It is a good
additional
philosophy for
modeling work.
However, it is
through another
method (RUP)
ASD
(Adaptive
Software
Development)
Adaptive culture,
collaboration,
iterative
development based
on component-led
mission
Organizations are
seen as adaptive
systems.
ASD is more based
on concept than
culture and software
practice.
Crystal
A family of
methods. Each one
has the same core
values and core
principles.
Technics, roles, tools
and standards varies.
Method design
Principle. Able to
choose the most
suitable method
based on project
size.
Too early to
estimate: Only 2 to 4
methods are
suggested.
Scrum
Independent, small
teams with automatic
development
organization, cycles
of 30 days.
Transfer ―defined
and repetitive for
new Scrum product
development‖
Scrum specifies in
detail how to
manage 30 days
cycles, but the
integration and
acceptance test are
not detailed.
Table 6 Comparision between agile methodologies
End Of Year Project Tracking Mobile
28
II. Mobile-D: A methodology for the development of mobile
applications:
II.1. Mobile-D introduction:
While many agile methods have been presented, none of them is specifically targeted
for the development of mobile software.
Mobile-D is an agile approach for mobile equipment, based on Extreme Programming
XP (practice), Crystal methodology (scalability) and Rational Unified Process (insurance
lifecycle). It is designed to reply to the specific development of the mobile application and the
quality standard of the industry. The ideal case is to have less than ten developers working in
an office.
The directors aim to provide a fully functional incremental mobile application in
several iterations. The development work is divided into different phases are exploration,
initialize, productionize, stabilize, and test and set system.
The practices of different phases consist of nine major elements: phase and stage,
online architecture, mobile test-driven development, continuous integration, pair
programming, metrics, process improvement software agile, customer off-site, and
concentration of the User-Centered. [8]
II.2. Why Mobile-D for mobile application?
By combining the benefits of three agile XP, Crystal and RUP, Mobile-D meets the
characteristics of the development of mobile application. This is shown in Table 2. [9]
Mobile-D and mobile software development characteristics
Mobile-D characteristics Rational Mobile software
High environment volatility Due to high change of
requirements, less need for
up-front design & planning,
need for incremental and
iterative development
approach.
High uncertainty, dynamic
environment: Hundreds of
new mobile phones
published each year.
Small development teams Small teams are able to react
more rapidly, share
information, less is
documentation needed, etc.
Majority of mobile software
is developed in micro or
SME companies, or
development teams.
Identifiable customer To avoid business
misunderstanding
Potentially unlimited number
of end-users. Business
customer easier to identify,
e.g. distributor.
Object-oriented development Failures do not cause loss of Majority of existing mobile
End Of Year Project Tracking Mobile
29
environment lives. More agility can be
pursued.
software is for entertainment
purposes. Mobile terminals
are not reliable.
Non-safety critical software Failures do not cause loss of
lives. More agility can be
pursued.
Majority of existing mobile
software is for entertainment
purposes. Mobile terminals
are not reliable.
Application level software Large embedded systems
require extensive
communication &
verification mechanisms
While mobile systems are
complex and highly
dependent,
mobile applications can be
stand-alone applications
Small system Less upfront design needed Sizes of mobile applications
vary, but generally they are
less than 10000 lines of
code.
Short development cycle For the purposes of rapid
feedback
Development cycles vary.
Generally mobile
applications and services can
be developed within 1-6
month time frame
Table 7 Mobile-D and mobile software development characteristics
From the table above, we can conclude that Mobile-D is suitable for mobile application
development.
II.3. Mobile-D in details:
Mobile-D methodology is composed by 5 principle phases: [8]
Figure 12Mobile-D
1. Explore:
The purpose of Explore phase is the planning and establishment of the incipient
project. ―A well planned is half done‖ is a saying to be remembered also in the software
development context. Explore phase can be timely unattached to the latter phases of Mobile-D
and also overlap with 0 Iteration phase. Explore phase is an important phase to set the ground
for controlled implementation of the software development product regarding, for example,
issues related to product architecture, software development process and environment
selection. Different stakeholder groups are needed to provide their expertise in the Explore
phase.
End Of Year Project Tracking Mobile
30
2. Initialize:
The purpose of the Initialize phase pattern is to enable the success of
forthcoming project phases by preparing and verifying all critical development issues so that
they all are in full readiness in the end of the phase for implementing requirements selected by
the customer.
3. Productionize:
The purpose in the Productionize phase is to implement the required functionality into
the product by applying iterative and incremental development cycle.
4. Stabilize:
The purpose of the Stabilize phase pattern is to ensure the quality of the
implementation of the project.
5. System test & fix:
The purpose of System Test & Fix is to see if the produced system implements
the customer defined functionality correctly, provide the project team feedback on the
systems functionality and fix the found defects.
The figure below represents each phase steps:
Figure 13 Mobile-D phases
Mobile-D phases are detailed in appendix A.
End Of Year Project Tracking Mobile
31
II.4. Mobile-D methodology evaluation:
The mobile-D methodology has the following advantages and disadvantages:
Advantages:
o Mobile-D is well adapted to mobile software development in small teams.
o Able to satisfy changing needs of users through short iterations (phases initialize
productionize, stabilize).
o Pair programming for each iteration working day step, is very efficient.
o Software documentation is complete.
o Every step is clear and detailed.
o Easy to monitor project progress
o Every step task is detailed.
Disadvantages:
Mobile-D is designed to fit the small system developed by a small team -> cannot be
adapted to complex business system (eg M-commerce) on the phone mobile in the future.
There is no teacher on the technologies and tools selection for mobile software
development.
III. Project planning
Our application is composed by a mobile application, and a web application. We decided
to follow the methodology proposed by mobile-D, because it’s the most appropriate for our
project. First, it exploits the advantages of other agile methods and it’s appropriate for mobile
applications. Moreover it’s very efficient for pair programming and it will help us to monitor
the progress of our project.
Therefore, we adopted this methodology for the planning of this project.
End Of Year Project Tracking Mobile
32
We used Gantt Project which is a GPL-licensed (free software) Java based, project
management software. It features a Gantt chart for project scheduling of tasks, and doing
resource management using resource load charts. It has a number of reporting options (MS
Project, HTML, PDF, spreadsheets).
The major features include:
Task hierarchy and dependencies
Gantt chart
Resource load chart
Generation of PERT chart
PDF and HTML reports
MS Project import/export
Exchange data with spreadsheet applications
WebDAV based groupwork [10]
The Gantt chart of our project is like the following.
-Project Planning
-Project note book
-Case Study
-Documentation
-Project Analysis
-project Conception
-Project setup
-Documentation
-Mobile development
-Web development
(iterative and incremental life cycle)
-Improve the quality of implemenation
-Finish documentation
-Mobile application test
-Web application test
Explore Initialize Productionize
Stabilize System test & set
End Of Year Project Tracking Mobile
33
Figure 14 Gantt Chart
Our project planning is based on mobile-D methodology. We will try to follow it
during all the project.
Conclusion
In this section, we talked about the methodology we will follow during the project
from its beginning to its realization and test.
End Of Year Project Tracking Mobile
34
Chapter 3 Project requirements analysis
Introduction
In this chapter, we will talk about our requirements by defining the various features of the
application. A requirement is said functional if it has to be accomplished at the end of the
development phase, otherwise it is said non-functional.
I. Project requirements
I.1. Actors
The actors of our application are:
The Mobile User (or the tracked user), he is the proprietary of the GSM.
The Web User (or the web administrator), he is the supervisor of the application;
he can view and follow tracks in real time.
I.2. Functional requirements
I.2.1. Mobile application
In this area the Mobile user had to:
Connects to the mobile application.
sets options such as:
o Enter the URL of your server side application.
o Adjust the GPS access period in seconds.
o Enter login/password
Send a position to the web server
o Displays latitude, longitude and other position relevant info.
I.2.2. Web application
In this area the Web user had to:
Connects to the web site.
Follow track in real time
Search for a track
End Of Year Project Tracking Mobile
35
I.3. Nonfunctional requirements
Some nonfunctional needs are required for our application:
Scalability: According to the mobile-D methodology, our application should be
extensible. We used the design pattern factory, to allow the possibility of developing
an additional part on the application.
Ergonomic website: applying some ergonomic rules in the Web application:
Simple web interface: The user doesn’t have to do a lot of clicks to access what he
seeks.
The map is centered on the middle of the page
Secured authentication, by using an MD5 password encryption.
II. Requirement analysis
In this part we will present the different use cases of our application then analyze each of
them.
II.1. Choice of methodology
A method of analysis and design provides a methodology and ratings standards helping to
develop quality software. It is essential to achieve a common understanding of the different
parts of an application.
Modeling is the designing of software applications before coding. Modeling is an
Essential Part of large software projects, and helpful to medium and even small projects as
well. A model plays the analogous role in software development that blueprints and other
plans (site maps, elevations, physical models) play in the building of a skyscraper. Using a
model, those responsible for a software development project's success can assure themselves
that business functionality is complete and correct, end-user needs are met, and program
design supports requirements for scalability, robustness, security, extendibility, and other
characteristics, before implementation in code renders changes difficult and expensive to
make. Surveys show that large software projects have a huge probability of failure - in fact,
it's more likely that a large software application will fail to meet all of its requirements on
time and on budget than that it will succeed. If you're running one of these projects, you need
to do all you can to increase the odds for success, and modeling is the only way to visualize
your design and check it against requirements before your crew starts to code.
End Of Year Project Tracking Mobile
36
So we used Unified Modeling Language (UML) which is a standardized general-purpose
modeling language in the field of software engineering. The standard is managed, and was
created by, the Object Management Group.
UML includes a set of graphical notation techniques to create visual models of software-
intensive systems.
Figure 15 UML
II.2. Application use case
Figure 16 General Use case
End Of Year Project Tracking Mobile
37
The diagram shows the use case for the application. There are 2 actors, 8 use cases which
represent for different action what actors can do with the system.
II.2.1. Mobile application
II.2.1.1. Use case diagram
Figure 17 Mobile Use case
II.2.1.2. Use case descriptions
II.2.1.2.1. Set options
In the following table we will describe the use case ―set options‖
Name Set options
Summary Allow the user to set GPS options
Actors The tracked person
Preconditions The user is logged
Basic course 1. The user choose the option menu
2. The user enter the server URL
3. The user adjust the GPS refresh period
4. The user validate the options
Alternative course N/A
Exceptions E1 the entered URL is not valid
2’. the system shows an error message
Post conditions The options have been saved
Table 8 Use case: Set options
End Of Year Project Tracking Mobile
38
II.2.1.2.2. Show Position
Name Show Position
Summary Showing actual GPS coordinates on the mobile application
Actors The tracked person
Preconditions The user is logged
Basic course 1. The user choose the Show Position menu
2. The system get coordinates (position) from the
GPS
3. The coordinates appears on the screen
Alternative course N/A
Exceptions N/A
Post conditions N/A
Table 9 Use case: Show position
II.2.1.2.3. Send position
Name Send position
Summary Sending GPS coordinates to the server using mobile data
communication
Actors The tracked person
Preconditions The user is logged
The position is shown
Basic course 1. The user choose the Show Position menu
2. The system get coordinates (position) from the
GPS
3. The coordinates appears on the screen
4. The user select ―Send position‖
5. The system establish a GPRS connection
6. The system send the position
Alternative course N/A
Exceptions N/A
Post conditions N/A
Table 10 Use case: Send position
End Of Year Project Tracking Mobile
39
II.2.2. Web application
II.2.2.1. Use case diagram
Figure 18 Web Use case
II.2.2.2. Use case descriptions
II.2.2.2.1. Follow tracks in real time
Name Follow tracks in real time
Summary Showing tracks on the map in real time
Actors The Web user
Preconditions The user is logged
Basic course 1. The user select the options ―Real time track‖
2. The system extract tracks from database every
2seconds
3. The tracks are shown on the map
Alternative course E2. There are no tracks in the database
2’. There are no tracks shown on the map
Exceptions N/A
Post conditions N/A
Table 11 Use case: Follow tracks in real time
End Of Year Project Tracking Mobile
40
II.2.2.2.2. Search for a track
Name Search for a track
Summary The web user can specify the characteristics of the track
and view it on the map
Actors The Web user
Preconditions The user is logged
Basic course 1. The user select the option ―search for a track‖
2. The user specify the track characteristics
3. The user specify the tracked person
4. The system extract tracks from database
5. The track is shown on the map
Alternative course E2. There are no tracks in the database
2’. There are no tracks shown on the map
Exceptions N/A
Post conditions N/A
Table 12 Use case: Search for a track
II.3. Analysis Class diagram
This diagram shows the classes without attributes or methods that we will use in the
conception section, it consists to see the whole working of the application
Figure 19 Analysis class diagram
End Of Year Project Tracking Mobile
41
II.4. State machine
UML state machine, known also as UML state chart, is an object-based variant of
Harelstate chart adapted and extended by the Unified Modeling Language. UML state
machines overcome the main the limitations of traditional finite state machines while
retaining their main benefits. UML state charts introduce the new concepts of hierarchically
nested states and orthogonal regions, while extending the notion of actions. UML state
machines have the characteristics of both Mealy machines and Moore machines. They support
actions that depend on both the state of the system and the triggering event, as in Mealy
machines, as well as entry and exit actions, which are associated with states rather than
transitions, as in Moore machines. [11]
Figure 20 State machine diagram
Conclusion
In this chapter we specified the functional and nonfunctional requirements of our
application which extends over two main areas which are Mobile application and Web
application.
End Of Year Project Tracking Mobile
42
Chapter 4 Design
Introduction
A design method defines the procedure to follow to establish a robust, reliable and
scalable application. In this chapter, we will present the different design stages of our
application and use some UML diagrams to model these steps.
I. General Design
I.1. System context Description
UML includes a set of graphical notation techniques to create visual models of
software-intensive systems. To design the operation of our application, we must study its
interaction with outside.
Our application has two parts:
The first one is the mobile application which will connect to a GPS.
The second one is the web site which will receive information from mobile side
and will be able to draw a real-time track and search for tracks
So now we are able to draw the context diagram of the application must identify actors.
I.1.1. Context diagram
A System Context Diagram (SCD) in software engineering and systems engineering are
diagrams that represent the actors outside a system that could interact with that system. This
diagram is the highest level view of a system, similar to Block diagram, showing a, possibly
software-based, system as a whole and its inputs and outputs from/to external factors. [12]
In our application, we distinguish two diagrams context located below:
Tracking Mobile:
Mobile application
Web Server
GPS
(JSR179)
Mobile user
End Of Year Project Tracking Mobile
43
I.1.2. Activity diagram
After presenting the context of our application, we will illustrate, in this part, activity
diagrams that describe functionalities of the application, and give an overview of all modules
of our application.
Activity diagrams are graphical representations of workflows of stepwise activities and
actions with support for choice, iteration and concurrency. In the Unified Modeling Language,
activity diagrams can be used to describe the business and operational step-by-step workflows
of components in a system. An activity diagram shows the overall flow of control.
This diagram presents the activity of the mobile side.
Figure 21 Context diagram
Web Server
Tracking Mobile:
Mobile application Web user
End Of Year Project Tracking Mobile
44
Figure 22 Mobile side: Activity diagram
End Of Year Project Tracking Mobile
45
The next diagram presents the activity of the web side.
Figure 23 Web site: Activity diagram
I.2. General View
The general approach is to declare the different packages used during the application
development.
A package diagram in the Unified Modeling Language depicts the dependencies
between the packages that make up a model. These packages are represented in this figure:
End Of Year Project Tracking Mobile
46
Figure 24 : Different packages of the application
In the application we used the Model–View–Controller (MVC) which is a software
architecture, currently considered an architectural pattern used in software engineering. The
pattern isolates "domain logic" (the application logic for the user) from input and presentation
(GUI), permitting independent development, testing and maintenance of each.
Model: collects the classes which are persistent classes like position and tracks
View: renders the model into a form suitable for interaction, typically a user
interface element. Multiple views can exist for a single model for different
purposes.
Controller: receives input and initiates a response by making calls on model
objects.
Service: contains the application services like the connection to the GPS
Utils: contains the utilities used to send on the GPRS and checking the GPS
device
End Of Year Project Tracking Mobile
47
II. Detailed design
In this section we will detail the design of our application by exposing the static view of
the system, using class diagrams and with the view dynamic sequence diagrams.
II.1. Sequence diagram
A sequence diagram in Unified Modeling Language (UML) is a kind of interaction
diagram that shows how processes operate with one another and in what order. It is a
construct of a Message Sequence Chart.
Sequence diagrams are sometimes called Event-trace diagrams, event scenarios, and
timing diagrams.
This diagram presents the Sequence of the mobile side.
Figure 25 Mobile side: Sequence diagram
End Of Year Project Tracking Mobile
48
The next diagram presents the activity of the web side.
Figure 26 Web site: Sequence diagram
II.2. Class diagram
In software engineering, a class diagram in the Unified Modeling Language (UML) is a
type of static structure diagram that describes the structure of a system by showing the
system's classes, their attributes, and the relationships between the classes.
II.2.1. MIDlet
Figure 27 MIDlet class
End Of Year Project Tracking Mobile
49
This class is the main class of the application, it contains the abstract method of a
MIDlet to run or destroy the application.
This class instantiates the controller of the application to run all services and it allows
the display
II.2.2. Package: Controller
Figure 28: Controller package
This package contains the class called ―Controller‖, it is used to control all the
inputs/outputs of the application. It must use a singleton pattern to have only one instantiated
Controller, contains a method like ―goTo(UI)‖ which is used to command the view package.
End Of Year Project Tracking Mobile
50
II.2.3. Package: View
Figure 29 Package View
This package ―View‖ contains all the human interface of the application, we see classes
like LoginUI, PostionUI, StartUI… All of these classes will use method done by the
controller.
End Of Year Project Tracking Mobile
51
II.2.4. Package: Model
Figure 30 Package Model
This package contains all persistent classes like the position information and tracks…
This information will be sent to the web server to be drawn on maps.
II.2.5. Package: Utils
Figure 31 Package Utils
End Of Year Project Tracking Mobile
52
This package contains classes that the application will use externally; ―GpsUtil‖ will
check the presence of the Jsr179 and ―HttpUtil‖ will make the GPRS connection between the
mobile side and the web side.
II.2.6. Package: Service
Figure 32 Package Service
The JSR package contains the class ―DeviceJSR179‖ which will connect to the JSR179
and collects all the information (Qualified Coordinates) about the position, speed and date.
This class uses the singleton pattern to instantiate only one device
For the next extension of our work, we prepared the service package with the design
pattern factory which is an object-oriented design pattern to implement the concept of
factories. Like other creational patterns, it deals with the problem of creating objects
(products) without specifying the exact class of object that will be created. The factory
method design pattern handles this problem by defining a separate method for creating the
objects, which subclasses can then override to specify the derived type of product that will be
End Of Year Project Tracking Mobile
53
created. More generally, the term factory method is often used to refer to any method whose
main purpose is creation of objects. used to make a factory to create a device connected to the
GSM (internal or external GPS).
II.3. Entity Relationship Diagram
An Entity Relationship Diagram (ERD) is a snapshot of data structures. ERDs show
entities in a database and relationships between tables within that database. It is essential to
have one of these if you want to create a good database design. The patterns help focus on
how the database actually works with all of the interactions and data flows, although another
useful tool is a Data Flow Diagram (DFD) which more directly describes this. [17]
Figure 33 Entity relationship diagram
Position: contains information about a position collected by the GPS and sent by the mobile.
Web_admin: contains login and password to the admin authentication.
Conclusion
In this section we have presented the detailed design of our application.
In the next chapter we will pass to the technical details of the development,
the working environment and the test of the application.
End Of Year Project Tracking Mobile
54
Chapter 5 Implementation
Introduction
This section represents the accomplishment phase of the project. We will first present our
work environment, then, we will outline the different steps of the realization of the
application.
I. Work environment
To accomplish this project, we have used many resources. We will detail them in the
following.
I.1. Programming languages
I.1.1. Programming languages for Mobile application development
Currently, there are many languages for mobile application development, but the two
the most used technologies are the Sun's J2ME technology using the Java language, and .NET
Mobile technology (or Microsoft Internet Toolkit) using Microsoft and .NET technology
languages.
In the following we will present the more known technologies in the market Sun's
J2ME.
I.1.1.1. Java 2 Micro Edition (J2ME):
Java Platform, Micro Edition, or Java ME, is a Java platform designed for mobile
devices and embedded systems. Target devices range from industrial controls to mobile
phones and set-top boxes. Java ME was formerly known as Java 2 Platform, Micro Edition
(J2ME).
Java ME was designed by Sun Microsystems; the platform replaced a similar
technology, Personal Java. Originally developed under the Java Community Process as JSR
68, the different flavors of Java ME have evolved in separate JSRs. Sun provides a reference
implementation of the specification, but has tended not to provide free binary
End Of Year Project Tracking Mobile
55
implementations of its Java ME runtime environment for mobile devices, rather relying on
third parties to provide their own.
Java ME devices implement a profile. The most common of these are the Mobile
Information Device Profile aimed at mobile devices, such as cell phones, and the Personal
Profile aimed at consumer products and embedded devices like set-top boxes and PDAs.
Profiles are subsets of configurations, of which there are currently two: the Connected
Limited Device Configuration (CLDC) and the Connected Device Configuration (CDC). [18]
Figure 34JavaME architecture
I.1.2. Programming languages for Web application development
I.1.2.1. PHP
PHP stands for Hypertext Preprocessor and is a server-side language. This means that
the script is run on your web server, not on the user's browser, so you do not need to worry
about compatibility issues. PHP is relatively new (compared to languages such as Perl (CGI)
and Java) but is quickly becoming one of the most popular scripting languages on the internet.
[19]
Why PHP?
The source code availability (PHP is licensed GNU LPG);
The simplicity of scripting
End Of Year Project Tracking Mobile
56
The ability to include PHP script in an HTML page
The ease of interfacing with databases (many Database Management System (DBMS)
are supported, such as Oracle)
Integration in many Web servers (Apache, Microsoft IIS…)
I.1.2.2. MySQL
The MySQL database is an open source system that offers a range of features
useful for our application. MySQL DBMS is powerful and used by many companies
A server database MySQL is very fast, reliable and easy to use; it runs on most
operating systems like Unix, Linux and Windows NT/2000/XP.
The MySQL software has the advantage of being free and highly adapted to the Web. For
these reasons it is the DBMS used by most web hosts to store data. [20]
I.1.2.3. JavaScript
JavaScript is a scripting language embedded in an HTML document. Indeed, this
programming language improves HTML in order to run some commands on the client side.
JavaScript was used to develop our web application with Google map API.
I.1.2.4. AJAX (Asynchronous Java And XML )
Ajax means a set of commonly used Web technologies such as:
XHTML, CSS, DOM and JavaScript, XML and XMLHttpRequest.
The heart of Ajax is mainly based on XMLHttpRequest, originally developed by
Microsoft that allows playback of asynchronous resources on a Web server.
He can be used to partially modify the page displayed by the browser and save the
updated without reloading the entire page. For example the contents of a form field can be
changed without having to reload the page with the title, images, menu…
End Of Year Project Tracking Mobile
57
I.1.2.5. XML
XML is not a language, but a format that allows languages definition. The
XHTML is an XML language; it is also a standardized form of HTML.
XML is a general language data formatting. This language has the advantage of being easily
transportable.
The main advantages of XML: [21]
Simplicity: Information coded in XML is easy to read and understand, plus it can be
processed easily by computers.
Openness: XML is a W3C standard, endorsed by software industry market leaders.
Extensibility: There is no fixed set of tags. New tags can be created as they are
needed.
Self-description: In traditional databases, data records require schemas set up by the
database administrator. XML documents can be stored without such definitions,
because they contain meta data in the form of tags and attributes.
Contains machine-readable context information: Tags, attributes and element
structure provide context information that can be used to interpret the meaning of
content, opening up new possibilities for highly efficient search engines, intelligent
data mining, agents, etc.
This is a major advantage over HTML or plain text, where context information is
difficult or impossible to evaluate.
Separates content from presentation: XML tags describe meaning not presentation.
The motto of HTML is: "I know how it looks", whereas the motto of XML is: "I know
what it means, and you tell me how it should look." The look and feel of an XML
document can be controlled by XSL style sheets, allowing the look of a document (or
of a complete Web site) to be changed without touching the content of the document.
Multiple views or presentations of the same content are easily rendered.
Supports multilingual documents and Unicode: This is important for the
internationalization of applications.
Facilitates the comparison and aggregation of data: The tree structure of XML
documents allows documents to be compared and aggregated efficiently element by
element.
End Of Year Project Tracking Mobile
58
Can embed multiple data types: XML documents can contain any possible data type
- from multimedia data (image, sound, video) to active components (Java applets,
ActiveX).
Can embed existing data: Mapping existing data structures like file systems or
relational databases to XML is simple. XML supports multiple data formats and can
cover all existing data structures.
I.2. Location API for Java ME
The Location API for Java ME is a compact and generic Java 2 ME API that produces
information about the device's present physical location to Java applications. This API can be
optionally supported by mobile phone and PDA manufacturers, with the minimum Java
platform required for this API being CLDC v1.1.
The Location API was developed under the Java Community Process as JSR 179, released
in September 2003 and updated to version 1.0.1 in March 2006. Nokia is the main author and
maintainer of this JSR.
OpenLAPI is an LGPL implementation for use in emulator environments where the Nokia
reference implementation does not exist and for devices which can access a GPS device over
Bluetooth. [22]
Features
The Location API is designed to work with many different positioning methods.
Generic interfaces let application developers implement systems that can retrieve location
data from multiple sources, based on their availability on the device. It has advantages over a
single means of tracking, including fail-over, indoor/outdoor transparency, and a choice
between the speed and accuracy trade-offs between GPS, cellular, or other positioning
methods. The API supports:
Current location - current latitude, longitude, altitude, direction, and speed of the
phone, and methods to convert it to text.
Landmark proximity - a store of landmarks can be stored on the phone's memory, and
the current location can be added as a landmark.
End Of Year Project Tracking Mobile
59
Address data - the nearest landmark's textual details, such as postal address, phone
number, country, and the building and its URL.
Location listeners - for dynamic location-based applications that will be triggered by
when the current location changes.
I.3. Software environment
I.3.1. Software environment for mobile application development
I.3.1.1. Visual Paradigm for UML
Visual Paradigm for UML is a Unified Modeling Language (UML) design tool that
supports all UML diagrams, SysML diagrams and entity relationship diagram. Visual
Paradigm for UML provides extensive use case modeling features including full function
UML use case diagram, flow of events editor, use case/actor grid and activity diagram
generation. Visual Paradigm for UML produces system documentation in PDF, HTML and
MS Word formats. Developer can design system documentation with template designer.
System analyst can estimate the consequences of changes with impact analysis diagrams, such
as matrix and analysis diagram. Visual Paradigm for UML generates Java code. [23]
I.3.1.2. NetBeans IDE Bundle for Java ME
The NetBeans IDE Bundle for Java ME is a tool for developing applications that run
on mobile devices; generally mobile phones, but this also includes entry-level PDAs, and Java
Card, among others.
The NetBeans IDE comes bundled with the latest Java ME SDK 3.0 which supports
both CLDC and CDC development. One can easily integrate third-party emulators for a
robust testing environment. You can download other Java platforms, including the Java Card
Platform 3.0, and register them in the IDE. [24]
I.3.2. Software environment for Web application development
I.3.2.1. Easy PHP
Launched in 1999, EasyPHP was the first and only WAMP software bundle available.
EasyPHP installs web server services onto the Windows computer and allows quick-and-easy
End Of Year Project Tracking Mobile
60
development of PHP and MySQL on a localhost (also known as 127.0.0.1). The package
includes an Apache server, a MySQL database, and the PHP extension. [25]
I.3.2.2. Adobe Dreamweaver
Adobe Dreamweaver (formerly Macromedia Dreamweaver) is a web development
application originally created by Macromedia, and is now developed by Adobe Systems,
which acquired Macromedia in 2005.
Recent versions have incorporated support for web technologies such as CSS, JavaScript,
and various server-side scripting languages and frameworks including ASP, ColdFusion, and
PHP. [26]
II. Realization
The overall architecture of our project is mainly composed of two major phases. The first
is the mobile part. The second phase is reserved for the web part.
This section is divided into two parts. In the first one we will talk about the mobile
application and in the second one, we will pass to the web application.
II.1. Mobile application
Due to the mobile phone technology progress, we have now the opportunity to have a
phone with integrated GPS, we decided to exploit this technology and develop a mobile
application that uses this type of device.
After receiving the GPS coordinates, the mobile application will establish a GPRS
connection to send HTTP requests to the server and save them in the MySQL database. This
information contains: date, time, speed, the position of the tracked person (latitude,
longitude).
And there is some screenshots to explain explicitly the work our application step by step:
End Of Year Project Tracking Mobile
61
Figure 35 Mobile login interface
To start with the mobile application you must
logon.
A form with two Textboxes (username &
password) used to authenticate and this
authentication will send later the username of
each track to the web server.
Figure 36 Mobile menu interface
Once you are logged on, you will have the
main menu, it’s a List containing ―GPS
Position‖, ―Options‖ and ―Exit‖
End Of Year Project Tracking Mobile
62
Figure 37 Mobile set options interface
If you click on the ―Option‖ from the main
menu you will be redirected to the option
form where you can modify and save your
configuration such as the URL of the web
server, the refresh period of collecting
information about position from the GPS
device and finally the login and password
Figure 38 Mobile show position interface
And if you click on the ―GPS Position‖ on
the main menu you will be redirected to a
form which allows you to see information
about your position collected for a GPS
device such as latitude, longitude, altitude,
speed, and the time.
And each position is sent to the web server to
be shown on the web site.
End Of Year Project Tracking Mobile
63
II.2. Web application
The administrator has to login to access the web application. After that he will be able to
view and follow different tracks of each tracked person, and manage them (editing or
deleting).
How to get positions from database?
A good solution is to have
A back-end script such as PHP, generating the XML file as required: parameters
are passed to this back-end script to refine which points are returned and this script
will return an XML document containing only points in that area.
Example of XML document:
And a JavaScript front end. Very basic, allowing interaction on pages and the map
display.
The web site is a human interface which will be used by the administrator so he must
authenticate to the server with a cool and attractive input boxes
End Of Year Project Tracking Mobile
64
Figure 39 Web login interface
Once the administrator is logged on, he will be redirected to the menu web page with to links
to let him the choice of what he wants to do.
Figure 40 Web menu interface
If he chooses a ―Real-time tracking‖ he will see a popup to choose the name of the tracked
person.
End Of Year Project Tracking Mobile
65
Figure 41 Web search by user interface
The administrator enter the name of the tracked person, and he will see a map showing real
time the moving of the person and each point shows the speed, altitude and other information.
End Of Year Project Tracking Mobile
66
Figure 42 Web Real time map
Or if the second link which is ―Search for a track‖ is chosen, also a popup will be shown to
enter criteria of the search such as the start date, end date and the name of the tracked person,
dates are entered with an attractive calendar to facilitate the input of dates.
End Of Year Project Tracking Mobile
67
Figure 43 Web search by date interface
The administrator enter the name of the tracked person and two dates, and he will see a map
showing tracks made by the selected person between those two dates and for each point track
he will see the speed, altitude and other information. And also he can do another searches.
End Of Year Project Tracking Mobile
68
Figure 44 Web map interface
Conclusion
In this chapter we presented the work environment and required tools of our application. We
have also detailed the different steps of the project realization.
End Of Year Project Tracking Mobile
69
Conclusion and future work
With the speed by which technology evolves, it is not a surprise that the world has
become 'smaller', in the sense that communicating with another person from the other side of
the world has become instantaneous.
Nowadays, almost everything is possible with the latest that technology has to offer,
which brings numerous advantages to users around the world. One of the products of the
continuous and advancing developments in technology is the GPS or Global Positioning
System.
The GPS technology is currently being used for a multitude of applications such as
GPS tracking systems which can be incorporated in mobile phones, vehicles, even a person -
or any type of object - that you would like to locate.
In this context, we have developed our application which is able to do mobile tracking,
allowing the administrator to manage tracks for each tracked user, by viewing, editing or
deleting them.
During the development of this application, we faced many problems, especially to
send data from the mobile to the Web application, but with a little perseverance and patience,
we were able to solve it.
Indeed, working on this project allowed us, first, to deepen our knowledge in
computing and particularly in mobile applications development. We also improved our skill in
J2ME and discovered different technologies such as GPS, GPRS.
In addition, we have learned through this experience to organize our work using the
mobile-D methodology, which in our case was an efficient way, to realize this project and to
make this work professional.
Our works can be helpful for many domains: It’s useful for employers, allowing them
to know how fast their employees are driving, how long a break they are taking (vehicle
hasn’t moved), and where they are! GPS Tracking can also eliminate your worry about your
goods, by allowing you to follow your truckers. This application can be used in many other
fields.
End Of Year Project Tracking Mobile
70
Besides, we can add other features when needed. For example, due to the fact that
some peoples can’t afford a mobile phone with integrated GPS, we can solve this problem, by
extending the same mobile application with the use of an external GPS and a Bluetooth
connection. We can also improve our application by adding a real time tracking. And so on…
this application is very extensible.
End Of Year Project Tracking Mobile
71
Appendix A: Mobile-D phases
Each phase is detailed in the following parts:
Explore:
The goals of Explore are to:
1. Establish the stakeholder groups needed in the planning and monitoring the
software development project,
2. Define and agree the goals and scope for the software development project, and
3. Plan the project regarding environment, personnel and process issues.
Figure 45 Mobile-D Explore
Table 3 : explore phase tasks
Steps Tasks
Stakeholder Establishment Client establishment
Stakeholder group establishment
Scope Definition Determine initial requirements
Project initial planning
Project Establishment Environment selection
Personal allocation
Architecture line definition
Process establishment
Table 13 Mobile-D Explore
Initialize:
The goals of the Initialize phase pattern are to:
1. Gain a good overall understanding of the product for the project team based on
initial requirements and architecture line descriptions.
End Of Year Project Tracking Mobile
72
2. Prepare physical, technical and human resources as well as customer
communication, project plans and all critical development issues so that they all
are in full readiness for implementing requirements selected by the customer
during forthcoming project phases.
Figure 46 Mobile-D initialize
Table 4 : Initialize phase tasks
Steps Tasks
Project setup set-up the physical and technical resources
for the project as well as the environment for
project monitoring
train the project team as necessary,
Establish the project specific ways to
communicate with the customer group.
Planning day in 0 iteration Architecture line planning,
Initial requirement analyses
Working day in 0 iteration Conduct the planned checks of critical
development issues
Solve open issues if possible without writing
source code.
Table 14 Mobile-D initialize
Productionize:
The goals of the Productionize phase are to:
1. Implement the customer prioritized functionality to the product.
2. Focus on the crucial core functionality by implementing them in the early
increment to allow multiple enhancement cycles.
End Of Year Project Tracking Mobile
73
Figure 47 Mobile-D productionize
Table 5 : Productionize phase tasks
Steps Tasks
Planning day Analyze requirements
Iterations planning
Acceptance tests generation
Acceptance test review
Working day Documentation
Reduced test development
Pair programming
Continue integration
Refactoring; improve current software
Inform client
Release day System integration
Pre-release test
Acceptance test
Verify if this iteration was good
Table 15 Mobile-D productionize
Stabilize:
The goals of the Stabilize phase pattern are to:
1. Finalize the implementation of the product.
2. Enhance and ensure the quality of the product.
3. Finalize the documentation of the product.
In this phase, there are 4 steps: Planning day, working day, documentation wrap-up,
release day. Planning day, working day, release day are the same as in productionize phase.
End Of Year Project Tracking Mobile
74
The purpose or the documentation wrap-up step is to finish the conception
documentation, UI and software architecture. We must ensure that documents made at this
step are short, useful, comprehensive and coherent with the source code.
Figure 48 Mobile-D Stabilize
System test & fix:
The goals of System Test & Fix are to:
1. Test the system based on the documentation produced in the project
2. Provide information of found defects
3. Allow the project team to plan fix for the found defects
4. Fix the defects
5. Produce as error free system as possible
There are 4 steps: one for system test, and three for correction.
The purpose of the system test step is to identify a software default and produce
information about theses defaults to correct them.
Figure 49 Mobile-D Test
End Of Year Project Tracking Mobile
75
The three steps to correct defaults are a normal iteration similar to productionize
phase.
Figure 50 Mobile-D Test&Fix
End Of Year Project Tracking Mobile
76
References and bibliography
[1] Geolocation essay, Kevin Jones, 2002
[2] Cell-ID
http://www.opencellid.org/ , last visit on February 2010.
[3] Time of arrival, Cell-ID location technique, limits and benefits: an experimental
study, Computer Society, 2004
[4] Global Positioning System
http://boltindia.com/gps.html , last visit on January 2010.
[5] GPS, Position calculation introduction
http://www.cmtinc.com/gpsbook/ , last visit on January 2010.
[6] GPRS (General Packet Radio Service),
http://www.mobile-phones-uk.org.uk/gprs.htm , last visit on January 2010.
[7] Online Mapping Services - a comparison,
http://www.gcna.org/data/MapsComparison.html , last visit on January 2010.
[8] Mobile-D,
http://agile.vtt.fi/mobiled.html , last visit on January 2010.
[9] Keynote: Mobile software development - the business opportunity of today,
Pekka Abrahamsson, 2005
[10] GanttProject,
http://www.ganttproject.biz/, last visit on January 2010.
[11] UML state machine
http://www.agilemodeling.com/artifacts/stateMachineDiagram.htm, last visit on
February 2010.
[12] System context diagram
http://www.pqsw.com/hjsasp/gn02.cfm?SI=43479230767&ID=921210469186, last
visit on February 2010.
[13] Activity diagram
http://radicaldevelopment.net/index.php/2010/02/17/uml-modeling-visual-studio-net-
2010/ , last visit on February 2010.
[14] The MVC Pattern
http://theweb3.net/articles/mvc-pattern.html , last visit on February 2010.
[15] Sequence diagram
http://www.agilemodeling.com/artifacts/sequenceDiagram.htm, last visit on February
2010.
[16] Class diagram
http://www.agilemodeling.com/artifacts/classDiagram.htm, last visit on February
2010.
End Of Year Project Tracking Mobile
77
[17] Entity relationship diagram
http://it.toolbox.com/wiki/index.php/Entity_Relationship_Diagram , last visit on
February 2010.
[18] J2ME tutorial
http://developers.sun.com/mobility/midp/articles/wtoolkit/ , last visit on March 2010.
[19] PHP
http://www.webdotdev.com/nvd/content/view/1039/211/ , last visit on March 2010.
[20] MySQL
http://www.mysql.fr/, last visit on March 2010.
[21] XML
http://www.softwareag.com/xml/about/xml_ben.htm , last visit on March 2010.
[22] Location API for JavaMe
http://java.sun.com/javame/reference/apis.jsp, last visit on March 2010.
[23] Visual Paradigm for UML
http://www.visual-paradigm.com/product/vpuml/ , last visit on March 2010.
[24] Netbeans
http://netbeans.org/, last visit on March 2010.
[25] EasyPHP
http://www.easyphp.org/, last visit on March 2010.
[26] Adobe Dreamweaver
http://www.adobe.com/fr/products/dreamweaver/, last visit on March 2010.