Professional Documents
Culture Documents
Real-Time Bus Tracker Mobile Application
Real-Time Bus Tracker Mobile Application
A thesis submitted in fulfilment of the requirements for the award of the degree
of Bachelor of Electrical Engineering (Electrical Power)
School of Electrical
Faculty of Engineering
Universiti Teknologi Malaysia
JULY 2020
DEDICATION
This thesis is dedicated to my father, who taught me that for his own sake, the
best kind of knowledge to have is what is learnt. It's also dedicated to my mother
who taught me that if it is done one step at a time, even the biggest task can be
accomplished.
iii
ACKNOWLEDGEMENT
Last but not least, I wish to express my deepest gratitude to my family who
support me in mental and health during the Corona Virus and Movement Control
Order on completing this project
iv
ABSTRACT
Public transport bus is used by all the citizens in every country that travel from
one place to another place. Bus is getting today’s demand transportation because people
can save their energy from walking in a long distance and took a shortest period of time
to reach their destination. Pengangkutan Awam Johor (PAJ) was becoming a popular for
public transportation in Johor as they expanded to all districts in the state of Johor and
provided a free bus service for users that have registered Bus Muafakat Johor (BMJ)
members card. However, end user does not have a real-time platform mobile application
for tracking live location of PAJ bus position and its route. This project aims to create
mobile application-based where the users or admin can detect the real-time location of
the bus shuttle, bus routes on that day, and getting update the latest information of the
bus PAJ through mobile application. Real-time PAJ Bus Tracker Mobile Application is a
system for Pengangkutan Awam Johor (PAJ) users to track the location of the bus as
everyday they had to face the same problems with delaying bus, bus not coming on the
right time, the driver of the bus does not follow the schedule in the time table of the bus.
By studying from existing vehicle tracker system that has been developed, this system is
created to be more friendly user and have more attractive interface while more
functionality. Android Studio has been used to develop this software mobile-based
application while Java has been selected as the programming language used for this
function bus tracker mobile application. After this mobile application have been
developed, this system helps the user to track the bus location in real-time where the user
can know the bus movement is headed. This project also helps the user getting update
the latest information of PAJ through this interesting mobile application interface.
v
ABSTRAK
vi
TABLE OF CONTENTS
TITLE PAGE
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENTS vii
LIST OF TABLES xi
LIST OF FIGURES xii
LIST OF ABBREVIATIONS xiv
LIST OF SYMBOLS xv
LIST OF APPENDICES xvi
CHAPTER 1 INTRODUCTION 1
1.1 Project Background 1
1.2 Problem Statements 2
1.3 Objectives 3
1.4 Scope 3
1.5 Significance of Project 4
1.6 Outline of Thesis 4
vii
2.3.1 Research on Singapore Bus Services (SBS – iris
Next Bus) System 6
2.3.2 Research Analysis on Bas Kita of National
University of Malaysia (UKM) 9
2.3.3 Research on Rice Bus Tracking System of
University Alaska Anchorageesearch on Rice
Bus Tracking System 11
2.4 Comparison between existing application and
proposed system 14
2.5 Review Summary Publications Journal 15
2.6 Summary 21
viii
3.6 Use Case Diagram and Description 33
3.6.1 Use Case Description 34
3.7 Sequence Diagram 37
3.8 Summary 37
ix
4.7 Summary 64
CHAPTER 5 CONCLUSION 65
5.1 Introduction 65
5.2 Objective Achievements 65
5.3 Future Work 66
5.4 Conclusion 66
REFERENCES 67
APPENDICES 70
x
LIST OF TABLES
xi
LIST OF FIGURES
Figure 2.1 Screenshot of the Singapore Bus Services system (SBS -iris
NextBus) on website page 7
Figure 2.2 Application layout (SBS -iris NextBus) screenshot –
Mobile Application 7
Figure 2.3 Mobile Application SBS iris NextBus estimation time
arrival interface screenshot 8
Figure 2.4 Mobile Application National University of Malaysia shuttle
tracking screenshot 9
Figure 2.5 Mobile Application National University of Malaysia route
bus screenshot. 10
Figure 2.6 Rice Bus Tracking System application screenshot on
Webpage 11
Figure 2.7 Rice Bus Tracking System application screenshot bus route
on Webpage. 11
Figure 2.8 Rice Bus Tracking System application bus route screenshot.
12
Figure 2.9 Rice Bus Tracking System live shuttle tracker and
estimated arrival time screenshot 12
Figure 3.1 Project Flow 23
Figure 3.2 Rapid Application Development(RAD) Model Cycle 24
Figure 3.3 Flowchart of Designing Apps 26
Figure 3.4 Android Studio Project Activites (Source: Android Studio) 29
Figure 3.5 Java Logos 30
Figure 3.6 Mapbox logos 31
Figure 3.7 JSON logos 31
Figure 3.8 Use Case Diagram for PAJ Bus Tracker. 33
Figure 3.9 Simple sequence diagram how the system works. 37
xii
Figure 4.1 Android Studio Setup Interface 40
Figure 4.2 Android Studio Setup Selected Components 41
Figure 4.3 Firebase Authentication in Android Studio 42
Figure 4.4 Connect Firebase Button in Android Studio 42
Figure 4.5 Implementation of Mapbox Map SDK. 43
Figure 4.6 Registration Process Coding 44
Figure 4.7 Forgot Password Coding. 44
Figure 4.8 Login Process Coding 45
Figure 4.9 Bus Marker Icons Coding.. 46
Figure 4.10 Data JSON in text arrangement 47
Figure 4.11 JSON File Coding. 47
Figure 4.12 Handler timer coding in initial of the loop data. 48
Figure 4.13 Login Page 49
Figure 4.14 Forgot Password Page 50
Figure 4.15 Automatic reply email to change password account user 50
Figure 4.16 Registration Page 51
Figure 4.17 Authentication database Firebase 51
Figure 4.18 Home Page and Main Page 52
Figure 4.19 About Us Page and Contact Us Pop Up 53
Figure 4.20 Real-time bus location page. 54
xiii
LIST OF ABBREVIATIONS
xiv
LIST OF SYMBOLS
xv
LIST OF APPENDICES
xvi
CHAPTER 1
INTRODUCTION
Public transportation in Malaysia has been significantly increasing for the past
couple of years. Bus transportation is the most convenient, most available time and has a
cheaper ticket for public transportation especially in a busy town or city. Nowadays,
people usually making their transit by bus instead of driving own vehicle. The reason
why consumers choose a bus for transit instead of driving own vehicle because driving
own vehicle needs to face the traffic jam which can take a long time to arrive at some
places. Other than that, driving own vehicle can have disadvantage such as expensive
parking fee, no parking slot and also to prevent from drowsy driving [1].
1
shuttle bus, the latest route of the PAJ bus, and the latest information regarding the
PAJ. The consumer can know the location of the bus and can get the latest updated
information regarding the bus. For example, if the bus delay or bus stop on that time
due to unexpected delays in traffic jams or bus breakdown or technical problems on
the road, the information regarding the bus will automatically send to the user app.
Hence, the user will not have to wait for a longer time and being clueless about why
their bus is still not arrived at the place.
The consumer does not have a real-time platform mobile application for
tracking live location of PAJ bus route position. When the bus routes have any
congestion traffic or due to technical problem on the bus, the user will be having
serious communication problem between the user and bus management team.
Therefore, they can track easily their bus position through this mobile apps.
Consumers also mentioned that they need to wait for a bus without knowing where
location of the bus but the consumer only know fix schedule time arrival. This
mobile application based is also help the BMJ members user to keep update the latest
information of PAJ. Public can notice the location of the bus and will alert the user if
the bus is near to the location of user. System management of the bus PAJ still have
poor management for their schedule as they need to keep update the schedule at PAJ
webpage but the time table for the bus are fix. Time wasted a lot waiting for the bus
as that time user can actually spend on the other matter.
2
1.3 Objectives
a. To provide mobile user access to the latest bus information of PAJ through
mobile application.
b. To design and display the real-time PAJ bus location from data text Web API
and show the real-time bus movement on the map using mobile phone.
c. To develop PAJ Bus tracking system in mobile application using GPS/GSM
tracking technology into bus transportation system and show simple and
understandable interface of this bus tracking application using Android studio
to operate
1.4 Scope
For this bus tracker system application, the scope of the research project has
been highlighted according to the project progress and priority. First of all, literature
review will be done on variety of journals that related to bus tracking system. This is
the important step to gain all the knowledge from the previous researchers on
specific topic to develop this application software. By reviewing their works, various
type of information and different approach can be obtained and taken as a reference
to design our own tracking system. Besides, by studying other researchers’ works,
the basic knowledge to code this software application can be achieved.
3
leave feedback and comment about the service easily, so the developer can improve
and fix the application.
Next, the tracking bus location algorithm will be studied to get the accuracy
of the bus location. Intensive efforts will be carried in to improve the features of the
mobile application. Bus route via Mapbox in mobile-based will also be covered and
will undergo step. The interface of this mobile application also important part in this
project as PAJ consumers and admin are the user of the application. The feedback
and rating can get from them while they use this application.
First of all, this project will bring some significant results that may help the
consumer knows the live location of the PAJ bus. Next, this bus tracker application
system will reduce time taken for information to reach the user. Last but not least,
this mobile application system will create a platform for Android to reach PAJ
mobile application using mobile phone.
In conclusion, this report was organized in five chapters. The first chapter
concluded with background of the project, problem statement, research objectives of
the project, research scopes of the project and its significance. Then, the second
chapter will continue with literature review section that will covered and discussed
more details about the basic requirements to design this PAJ Bus Tracker System.
Next, in chapter 3, all the research methodology including the RAD approach,
component inside the software development, source code development, and hardware
implementation in this project while Chapter 4 shows the results of the project that
have been carried to develop this mobile application. Last but not least, chapter 5
will be the conclusion for this project design and recommendation for future works
planning that can be done.
4
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
5
its operating system, it is capable to interact with hardware and software such as
advanced technology available on mobile devices including the global positioning
system (GPS) and camera [5]. It comes with a language programming
implementation such as HTML, CSS, Java and C++. In this project, Android Studio
will be used as the platform in generating bus tracker mobile based application.
There are many existing applications that are related to real-time bus tracking
system which has been existed and developed. In this section, four existing system
will be review firstly, Singapore Bus Service (SBS – iris NextBus) System in
Singapore. Secondly analysis on Rice University Shuttle Bus Tracking System in
Texas, USA Third, analysis on Bas Kita in National University of Malaysia. All
these systems have its own characteristic, difference approaches and some of
advantage and disadvantage should be taken in their mobile applications. The
proposed application (PAJ Bus Tracker) will be developed based on these existing
applications as a reference. Besides, studies are also performed regarding on
technologies involved and methodology applies in the proposed system.
2.3.1 Research on Singapore Bus Services (SBS – iris Next Bus) System
(Source via website https://www.sbstransit.com.sg/Service/BusService )
6
Figure 2.1: Screenshot of the Singapore Bus Services system (SBS -iris NextBus) on
website page
Figure 2.2: Application layout (SBS -iris NextBus) screenshot – Mobile Application
7
Figure 2.3: Mobile Application SBS iris NextBus estimation time arrival interface
screenshot
Singapore Bus Service (SBS) iris NextBus application system is a public bus
transportation tracking system that have been developed by Singapore which provide a
real time platform to check on bus traffic status. IRIS is the acronym for Intelligence
Route Information System. This system is used for traveller to gain all the information of
the bus route where the user needs to search for the particular bus with bus service
number or just refer the name of the destination on right name of the service number.
Other than that, user can look up for the bus stop code number to know which bus used
via the bus route while the estimated arrival time just need to click on the refresh button
in right hand side of the bus and then the time will be show to user [6].
8
So, this application will ease the user to find the only particular bus the users want. This
advantage can help user to reduce data loading when requesting for the bus traffic data,
because it just only information which the users want to know. Hence, the system is
clearly showed every bus shuttle with bus stop code number and bus service number and
the location to the user so that user will be able to know which bus stop it is.
However, SBS iris NextBus mobile application have limitation for the
outsider or traveller. Because this system is not friendly view in google map, the user
itself need to know and remember the exact location name, bus service number and
bus stop code to use this system. Then, the user will be received the information of
the road traffic of that bus route.
9
Figure 2.5: Mobile Application National University of Malaysia route bus
screenshot.
Bas Kita is a mobile application based to track the bus route of UKM bus
inside the campus. This bus tracker mobile application used GPS system to display
the location of the Bas Kita in maps and routes to the different location. It also can
track the bus location using client-server technology which is centralise forward to
client device. This bus tracker is developed by Android platform version 1.1 and
release on September 2017 (Source: Bas Kita Mobile Application). This project is
implemented using Android Studio and SQL domain for database.
The reason why this mobile application Bas Kita is been created is to improve
the UKM bus services and enhance the UKM students, lecturers, staffs and visitors to
ride on the bus where they able to view the information and the location of a bus
shuttle and its route with estimated arrival time of the bus. On bus driver site, bus
drivers are able to send the update data of traffic jam via this application to provide
immediate updates and the notification will be delivered to the user instantly.
10
This Bas Kita mobile application also have disadvantage for the user. User
from UKM student have said that this application sometimes did not show any buses
in university also have no live GPS. The tracker is just launch but have error bus
location on the map.
Figure 2.7: Rice Bus Tracking System application screenshot bus route on
Webpage.
11
(Source via mobile application:
https://play.google.com/store/apps/details?id=com.ad.android.ridesystems.ridetr
aq&)hl=en)
Figure 2.8: Rice Bus Tracking System application bus route screenshot.
Figure 2.9: Rice Bus Tracking System live shuttle tracker and estimated arrival time
screenshot.
12
The shuttle bus tracking system that show from Figure 2.6 – Figure 2.9 is
developed by Rice University located in Texas, USA. This system is embedded with
Google Map and simple interface for the user to use this bus tracking system with all
the information of the route and the estimated time arrival.
In this Rice University tracking system, the map provided is focusing on the
campus area of Rice University where this tracking system has a specialty incapable
to update the bus location and its speed [9]. The bus icon will appear on the map and
will be updating the location with an interval of 2 seconds. It is a very fast update
and efficient bus tracking system compare with other existing bus tracking system.
With high update speed, the bus icons that appear in the map is like a moving bus
from the user of view. In addition, it has similar application features like in Google
Maps that allow the user to zoom out and zoom in without affecting the bus icons'
appearance. The bus icon location and the speed are maintained.
The weaknesses of Rice University are it does not show bus stop in the map.
User will not know where the buses moving will stop if the user do not know the
exact location of the bus stop. Those, for some user it will be difficult enough to use
this tracking system. Another drawback of this system are does not show the real
time bus arrival. User has to estimate the bus arrival time based on the bus icons and
the speed of the bus.
In the other hand, Ride system mobile application make it easy to the user check
the bus movement but to in a real-time system. The Ride system mobile application
shows the bus drivers and where the bus will pick them up. It provides the location of the
bus in the map, arrival predictions and other important part of the bus.
13
2.4 Comparison between existing application and proposed system
14
2.5 Review Summary Publications Journal
15
16
17
18
19
From Asian Journal of Applied Science and Technology (AJAST) with entitled
“Smart Bus Tracking System Using GPS Technology”, author have mentioned that to
monitor a location and timing of the college bus in real current location of bus, it can be
work using GPS and GSM technology. In this journal, they used both technologies to
continuously monitor a moving bus, so a microcontroller is interfaced serially to a GSM
Modem and GPS receiver used to send the position (Latitude and Longitude) of the
buses from a remote place. As a result, the android application for this system gives the
information about the college bus for students and staffs [17].
20
developed between student and the bus management team. With this platform,
students able to check on real time bus arrival time for particular bus stop [18].
2.6 Summary
This chapter has been discussed about the comparison of the existing system
and the proposed system. In this chapter, few functionality, advantage and
weaknesses from existing system has been identified to be measure and taken before
the proposed system is develop. Comparison have been made so that it can make the
proposed system perform better and yet low cost. Other than that, research has been
done towards the software that will be used in developing the application using
Android Studio and Firebase database software. For the hardware, GPS tracker
device will be used.
21
CHAPTER 3
RESEARCH METHODOLOGY
3.1 Introduction
This project involved design for the whole system been assembled. In order
to make it simplify, a few steps and methodology approach were interpreted as
project flow as in Figure 3.1. After lots of research on literature review on smart bus
tracking system, a comprehensive methodology was applied to develop this system
as a structure planning and process development of the system. In this chapter, all the
methodology of the proposed system will be covered with details that describe all the
information method to construct this system.
22
3.2 Justification
23
3.3 System Development Methodology
RAD can be split into four main phases which can classified into
Requirement Planning, System Design, Development and Cutover. This system
development where prototyping cycle is built continuously until the system or the
functionality meet the requirements to achieve all the characteristic of the proposed
system. Each phase has a different of activity and play different role. Figure 3.2
below illustrate the RAD life cycle.
Requirement/
Planning
System
Development
Design
Cutover
Planning has been done during the first phase. At first stage of RAD approach,
analysis of the tools and technology that related of the proposed system included the
hardware and software has been identified and all the information are collected to meet
the requirement of the system. After discussing with supervisor about the title of the
proposed system, a strategic plan was carried out by doing comparison with several
existing system in literature view part. This proposed system has been decided based on
the functionality which most commonly appears in the reviewed existing system.
24
Based on research studies on existing system, some common problems were
highlighted and problem statements were generated. For example, the algorithm to
code the accuracy of estimated arrival time need to be consider as a main problem as
they can determine the performance of bus service PAJ. According to the proposed
system, the development system has to provide a real time bus tracking, reduce
operational cost, and can be use in mobile based device. Scope and object of the
project also had been clarified in planning phase.
After analysis and planning phase have been made, the second stage in RAD
cycle is the system design where the functional system of the proposed system has to
be developed on this phase. In prototyping methodology, design stage is a
prototyping loop point where the first prototype is produced in a first loop of the
design stage. After the first prototype have been tested by the user or the developer, it
will give a first feedback and preliminary result of the project.
25
Design the layout Set data text from Add handler
and interface of JSON as bus function and delay
mobile apps marker for bus movement
3.3.3 Development
After the prototype cycle is completely designed and meet all the
requirements user and developer, this mobile application is tested on the
functionality and the validate features of mobile apps whether it can function
properly or not. In this phase, test plan is created with test strategy and the test result
will be recorded systematically for further evaluation. White box testing is used to
examine the program logic and code in Android Studio while the black box is testing
the mobile application without knowing the internal structure.
3.3.4 Cutover
After final system is developed, final testing will be made to ensure the prototype
fulfilled the goals and meet the requirements of the project. In this phase, final version of
prototype is ready to be implemented and applied on the real operating environment. All
the data are ready to be documented after the final version of mobile application is
success to be implemented including the features to detect the location of the bus, track
route of the bus on that day, the estimated time arrival of the bus, and
26
getting latest update information about bus PAJ. This development must be
documented in organize report so that the system can be easily improvised and
maintained in the future.
In this project, user requirements are specifically divided into two parts which
are interface and easy to use. Next requirements specification for software and
hardware will be listed in Table 3.1 and Table 3.2.
i. Interface
A system that have full information interface where it is friendly user
to consumer so that they can easy to understand how to use the system
without getting any confusion but the user can get what they need.
27
3.4.2 Software Requirements
The equipment and technology analysis are all about the tools and technology
to be used in the project proposal. In this section, the tools and technology used in
this project will be well defined.
28
3.5.1 Smartphone
29
3.5.3 Java
Mapbox Map SDK is additional software tools used in the android mobile-
based application and web application to display the real map view. Mapbox is also a
navigation platform that can add location features like map styles, map search, map
marker, map route, and navigation tools into any application. It enables developers to
interact with Map API including the Maps, Geocoding, and Directions APIs.
30
Figure 3.6: Mapbox logos
JavaScript Object Notation is a data that stores in an open standard file format
consisting of attribute-value pairs and array data types where humans can read and
understand. JSON (JavaScript Object Notation) File is one of the platform methods to
exchange data between a browser in JavaScript to a server in a text file format. JSON is
a trivial data-interchange format where it is easy to read and write. Data style format in
JSON arrangement easy for machines or software to parse and generate.
31
3.5.7 Router
Programming language is used to code the main function in this project and
to write the algorithm for the function to run smoothly when this mobile application
is developed. Programming language help the developer to design the interface of
this mobile application and to create the layout XML file more interesting.
In this project, database system is used to collect all the data information in
organized system so that it can be easily referred, accessed, managed and updated. In
this project, all the database is reuse from what PAJ have been built to retrieve the
data. Firebase database is used to capture and analyze the data in this project.
Firebase database helps the programmer to construct a real-time database for the
project and all the information are saved in organize documents. It solves all the
common app development challenges by help the developer to develop high quality
apps. Firebase database ensure the application to have cloud storage, hosting,
authentication and also provide the real-time database[15].
32
3.6 Use Case Diagram and Description
(Shrivathsan, 2009) said that use case model is a block diagram that will be a
medium of interaction between the user (more generally, an “ actor”) and a system
that enables the user to achieve a goal. The most important part of the use case model
is to identify the functionality of the proposed system. In general, PAJ bus tracking
system has identified two actors which are PAJ user and developer. PAJ users
represent the client who choose the bus service number and the route destination,
while the developer received the notification and will send all the data information
about the bus and the route that will going on that day. This use case model is
focused on communication between the PAJ user and the developer where two-way
communication is appeared through the mobile-based application. Figure below
illustrate the use case model and how the actors is related.
Check Schedule
Update Schedule
View route
33
3.6.1 Use Case Description
For the Use Case in Check Schedule and Update Schedule as shown in Table
3.3 and Table 3.4, this use case project will show the interaction between the PAJ
user to view the scheduled of the bus route with update from the developer schedule.
PAJ user need to download the application and install and run the application to view
the schedule
34
For the Use Case in View Route, the actor will be played only by PAJ user
while the developer not involved. This is because, in this project, the PAJ user only
wants to track the latest bus route by using this view route use-case. This view route
is seen by the user using the map view design of the Mapbox.
For the Use Case in Latest Update Information, the actor will be played only
by developer while the PAJ user not involved. This is because, in this project, the
developer only can update the latest information and news regarding of the PAJ bus
breakdown. Developer will retrieve the information from the application.
35
For the Use Case in Latest Update Location, the actor will be played only by
developer while the PAJ user not involved. This is because, in this project, the
developer only can update the latest location by changing the latitude and longitude
of the PAJ bus. Developer will notify the PAJ user about the bus location and
retrieves information from the application.
36
3.7 Sequence Diagram
3.8 Summary
As for the conclusion, RAD methodology approach is the right decision even
there many development models available in public such as Waterfall model,
incremental mode, spiral model and rapid application development model. After
several considerations, Rapid Application Development was chosen as methodology
for the proposed system. This is because this type of method is less focus on
planning but more focusing on the development. Furthermore, it is important to
reduce the development time and relatively low cost. By following of four main
phases in RAD methodology which are requirement planning, design prototype,
testing and implementation phase, the result will be more efficient. Moreover, a draft
design and system requirements have been explained briefly with fundamental
system architecture, use case diagram and sequence diagram.
37
CHAPTER 4
4.1 Introduction
This chapter will show the finalized result and achievements of Pengangkutan
Awam Johor (PAJ) Bus Tracking Mobile Application System which will be
compared with the scopes and objectives of the project. Other than that, the
challenges and the problems that were faced during gathering of the component,
modules, requirement and designed the system interface were also discussed. The
further enhancement of the project also will be discussed in this chapter.
This section will discuss on the configuration that being involved throughout
the process of the development of the system including the online server
configuration and mobile-based system development.
PAJ Bus Mobile Application System uses card reader and router inside the bus
Pengangkutan Awam Johor to send the data of the bus location and the user database to
the online server. The online server is configured when the card reader scanned the
member card of the user. The router on the bus will provide the internet connection to
38
the card reader when it sends the data to its server. Meanwhile, the connection between
server and database should be established as priority to access the system. Error can be
occurred if there was any failure in connecting the database to the server.
39
Java A programming language that used inside the Android
Studio to run any coding or fetch any algorithm in order
to create a project.
Firebase An assistant tool window in Android Studio for mobile
platform application development that help in
authentication user base.
Mapbox A navigation SDK tool for Android Studio that allow a
creator to build a complete application with collection
features when building navigation applications for
Android.
40
2. After launching the Android Studio and install Java SE Development Kit
13.0.2, choose file path JDK in download folder and choose component
which feature needed to develop an application in Android Studio by tick the
check boxes. Figure 4.2 shows selected component to install for Android
Studio such as Android Studio Development (Android SDK), Android
Development Tools (ADT) and Android Virtual Device (AVD).
3. After installation completed, click the Next button on the console and click
finish button to complete the installation.
Firebase is a free developer that can be obtained from Android Studio. This tool
is used to store the registration database user after completed the registration form. It
stored all the database user in Firebase console. Figure 4.3 and Figure 4.4 shows the
button to click where the tools can connect the Firebase with Android Studio Project.
41
Figure 4.3: Firebase Authentication in Android Studio
Mapbox Maps SDK is a tool navigation for Android Studio to configure Map
View in Android application. It will show the map route and map view to navigate
objects. Below is the step to install Mapbox in Android Studio:
42
1. Create an account for the Mapbox and implement the Mapbox Map SDK
installation in dependencies of Android Studio where we need to copy and
paste the line 17 ‘implementation 'com.mapbox.mapboxsdk:mapbox-android-
sdk:9.1.0' as shown in Figure 4.5 to the build gradle module.
2. After implemented the line 17 in Android Studio, next click the console button
‘Sync now’ on the top right corner of the build gradle to complete the installation.
43
4.4.1 Registration
44
4.4.2 Login
45
4.4.3 Appear Bus Marker
Display a bus marker is one of the main functions in PAJ Bus Tracker Mobile
Application. Once the map is set up and the style has loaded, the marker icons can be
added to make an adjustment on the map. Map marker used custom images to
identify the location of the bus on a map. Markers indicate single locations on the
map. They are usually referred to as "icons." For PAJ Bus Tracking Mobile
Application, the image of bus icons is used as a marker. Figure 4.9 shows the partial
coding on how to display the bus marker icons on a map. These bus marker icons
will show the location of the bus. Bus marker icons appeared on the map by
following the latitude and longitude of the bus. Once the latitude and longitude are
changing, the bus icons will move to the new location.
46
4.4.4 Read Data JSON File
Data JSON File is one of the platform methods to exchange data between a
browser in JavaScript to a server in a text file format. JSON (JavaScript Object
Notation) is a trivial data-interchange format where it is easy to read and write. Data
style format in JSON easy for machines or software to parse and generate. In this
application, the data location of the bus name, latitude and longitude of each bus will
be read using JSON format in URL given http://103.75.188.69/api/test.php. Once the
latitude and longitude can be read and simulate in Java programming language
algorithm, it will appear all the JSON file in an array or as an object file as shown in
Figure 4.10 while Figure 4.11 shows coding on how to read JSON file.
47
4.4.5 Locate Bus Location
Data latitude and longitude PAJ bus location are stored in JSON text file format.
Once the data is updated in every 10 seconds interval in Web API, it will show different
latitude and longitude of the bus. The algorithm Real-time PAJ bus location can be
detected using timer and handler in Android Studio as shown in Figure 4.12. To get the
accurate location of the bus, the coding of the timer is used after the data location of the
bus is looping and update every 10 seconds. Therefore, the bus marker icons will show
the bus is moved from one location to another location.
48
4.5 Mobile Application Interface Design.
Figure 4.12 shows the interface of the login page that will be used on PAJ bus
tracker mobile application. To operate this mobile application, the end-user or
consumer need to log in to this application by using their email and password after
the registration form is been made. Therefore, the user needs to sign up first before
entering this system by clicking the text view “Sign Up Here”. However, if the user
forgets the password of their account, they just need to click the word “Forgot
Password” and will directly to Forgot Password Page
49
4.5.2 User Forgot Password Page
User can reset their password account by filling their email address on the
blank box in this page. Once the user filled their registration email in the box, the
user needs to click on “Send My Password” Button and the user will receive
automatic notification reply on their registration email to change the old password to
the new password as shown in Figure 4.14 below.
50
4.5.3 Registration Page
Figure 4.15 above shows the new user page to register and sign up for this
mobile application accessibility. This page requires the user to register first by filling the
username, email, password, and phone number to be able to log in the home page. The
data that the user filled will be auto-save on the Firebase database as shown in Figure
4.16. Once they finished register, the user will directly go to the Login page.
51
4.5.4 Home Page
Figure 4.17 illustrates the interface of the Home Page and Main Page for PAJ
bus tracker mobile apps. When the user successful login to this mobile application, it
redirects to this home page. On the Home Page, the user can choose either to log out
or enter the PAJ bus apps to use all the features in this mobile application such as
news update of PAJ, about PAJ and search the PAJ bus location in Johor Bahru.
52
4.5.5 About Us Page
53
4.5.6 Bus Location Page
Real-time bus location page is shown above in Figure 4.19. User can view all
the bus are moving along the route in this page through map view using Mapbox.
The bus icons in black and blue color illustrates the location of the bus where it stops
and moves to another location. The latitude and longitude of the bus is detected using
JSON file as mentioned above in JSON file coding. To appear the bus location,
developer need to assign using bus marker. Therefore, user can easily view and know
when the bus will arrive on their location.
54
4.6 System Testing
Unit testing is one of the software testing categories where the single
components or the functions of a system are tested to certify each module works as
intended. The main objective of unit testing is to identify all the required components
function match with their corresponding results. If the result of the unit testing does not
execute the expectation results, the developers have to repeat the process of debugging
and testing until the output achieves accurate results satisfactions. For this project, the
unit testing is conducted through each module designed in PAJ Real Time
55
Bus Tracker System. The modules for the system are Login Module, Registration
Module, Forgot Password Module, Logout Module, Read Data JSON Module, PAJ
Contact Module, Map View Module, Bus Marker Module and Location Bus Module.
Firstly, the test case login module in this project function to identify the
system functionalities for the user to login with the registered account in this mobile
application before the user enters the application. The user needs to fill in their valid
username and password to make sure the login process successfully to access this
mobile application.
56
Next, the test case registration module in this project function to check the
system functionalities for the user to register error-free with the correct format of
password, username, email and phone number. This designed module function as
authentication panel for the PA user to store their database in Firebase database
where it can use for the login module function
57
• Click Register button empty fields must be
filled.
• All the input fields are • Display alert massage to Pass
empty notify user that the
• Click Register button empty fields must be
filled.
Test case forget password module in this project purposely to identify the
system functionalities for the forgot password page. In this page, it will provide a
platform for the user to set up new password when the user unable to remember their
old password. User need to click the forget password text and input the valid
registered email to get the result correctly.
58
• Set new password with its • Display error Pass
length less than 6 message to notify
character. user about the invalid
• Click Reset Password new password length.
button
• Set new password with • Display new Pass
valid format password successfully
• Click Reset Password changed and redirect
button to Login page
Besides, the test case for the logout module in this project purposely to
checks the system functionalities for the logout button run perfectly when the user
wants to logout of their account from this mobile application.
Test case for read JSON file module in this project function to check the
system functionalities for the web API in URL given and database server can be read
as a data text precisely. This test case justification for the data text is assigned with
the right latitude and longitude as a bus marker in a map view.
59
Module: Data Panel Designed 1/5/2020
Date:
Test Title: Read JSON File Pre- -
requisite:
No Test Test Procedure Expected Result Pass/Fail
Case
5 Read • Enter valid URL on coding • Data JSON Pass
JSON • Click Read button successfully read as
File object and array
• Enter invalid URL on • Data JSON cannot be Pass
coding read
• Click Read button
• Assign the latitude and • Data JSON appear as Pass
longitude from JSON file bus marker
as bus marker.
• Assign the data JSON file • Data JSON appear as Pass
as object object assigned
• Search the object after
debug the project
Test case for contact module in this project function to check the system
functionalities run correctly for the PAJ user to send the enquiry to the developer.
This module is still under maintenance but the pop-up contact module have
successfully created.
60
In Table 4.8, the test case for map view module in this project function to
identify the system functionalities in order to run this system successfully appeared
the basic map view in this mobile application. This map needs to pass all the
requirement functionalities for the user to find the route in the map easily
In Table 4.9, the test case for bus marker module in this project function to
identify the system functionalities in order to run this system smoothly without any
error and clearly show the bus marker corresponding to the latitude and longitude.
61
No Test Test Procedure Expected Result Pass/Fail
Case
8 Appear • Upload an image of red • Red marker appeared Pass
Bus marker as a bus marker on the
Marker • Click Run button map
• Change the red marker • Red marker is changed Pass
icons with image bus icons with bus image as a
• Click Run button bus marker on the
map.
• Click Search Bus button • Display map with bus Pass
marker on map.
In Table 4.10, the test case for bus location module in this project function to
test the system functionalities in order to run this system precisely with zero error
and shows the bus movement moved accurately in real-time location. This test is
created to ensure the bus can turn left and right smoothly without any delay.
62
4.6.2 Non- Functional Testing
During the movement control order, 10 respondents were chosen to use and
test the developed system. This usability testing is divided into two parts, which are
mobile application interface design part and system functionality part. After the
usability testing has been successfully done, the respondents are been interviewed
using online conversation to answer a simple question regarding the performance of
the developed system
Table 4.11: Summary feedback of user regarding interface design for this project
Very Not
Functionality Impressed Impressed Average
Impressed Impressed
Font Style 6 2 2 0 0
Font Color 10 0 0 0 0
Font Layout 6 2 2 0 0
Background
8 0 2 0 0
Colour
Button 10 0 0 0 0
Images 6 1 3 0 0
63
Table 4.11 shows the number of respondent majority responded the user
interface of this mobile application is interesting and user friendly. Based on the
respondents’ opinion, it clearly shows that most of the respondents have rated the
quality and functionality of the system as easy to use and intuitive.
4.7 Summary
This chapter has stated the finalized result and discussion of the developed
system. It described the installation and configuration of the technology that during
the entire of this system development. Moreover, this chapter also highlighted the
algorithm used in coding system main function corresponding with the mobile
application interface. Besides, this chapter clearly shows different testing on that
particular system requirements. There are two types of testing carried out in this
chapter, namely functional testing and non-functional testing. Functional testing is
concerning about testing of the functionalities while non-functional testing focused
on usability and performance of the developed system
64
CHAPTER 5
CONCLUSION
5.1 Introduction
This chapter will conclude all the accomplishment of the developed project.
Moreover, the objective for this mobile application will be discussed and compared
with the project achievements to ensure all the outlined requirements are met.
Furthermore, the future work of the system will be mentioned in order to discuss the
improvement of this project for the future purpose to enhance this mobile application
65
successfully read accurately and being
tested with the speed of delay function
To develop PAJ Bus tracking system in The developed system provides user
mobile application using GPS/GSM friendly mobile application interface for
tracking technology into bus the user to seek the bus location and
transportation system and show simple information regarding the PAJ. The
and understandable interface of this bus system runs smoothly from the feedback
tracking application using Android of the users
studio to operate
5.4 Conclusion
66
REFERENCES
[1] Chit, Su Mon, et al. “A Pilot Study: Shuttle Bus Tracker App for
Campus Users.” 2017 International Conference on Research and
Innovation in Information Systems (ICRIIS), July 2017.
[2] Zhou, Pengfei, et al. How Long to Wait? Predicting Buss Arrival
Time with Mobile Phone Based Participatory Sensing General Terms.
Vol. 12, 2012.
[5] Mithapelli, Nikita, et al. “Alumni Tracking Using Google Map API
and Social Media Based on GPS and LBS”. International Journal of
Engineering Science and Computing, 2016, 10.4010/22016.593.
67
Tracking System, International Journal Research and Applications
(IJERA) ISSN: 2248-9622 Vol. 1, Issue 3, pp.616- 625.
[9] Dr D Burga Bhavani, S., C., V., Ravi Kiran (2017) Implementation of
Smart Bus Tracking System Using Wi-Fi, International Journal of
Innovative Research in Science, Engineering and Technology, Vol. 6,
Issue 7, July 2017.
[10] Süleyman Eken, Ahmet Sayar (2012) A Smart Bus Tracking System
Based on Location-Aware Services and QR Codes.’ IEEE publication
journal, pp.36-40.
[11] Gasimov, A, Phang, C. W., Tan C., & Sutanto, J., (2010) Visiting
Mobile Application Development, How and Where. 2010 Ninth
International Conference on Mobile Business/2010 Ninth Global
Mobility Roundtable.
68
International Journal of Computer Trends and Technology, IJCTT,
Vol 68, April 2020, pp34-40
[19] Sarra Jay, Priyadarshini Ishaani, Pattnaik, “Real Time Bus Monitoring
System”, Third International Conference India, January 2016, Volume
1, pp 219-223
69
APPENDICES
APPENDIX A
WEEK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
70
5 Study on the Firebase
Database and Java Language
6. FYP1 Seminar preparation
7 FYP1 Seminar
71
GANTT CHART FOR PROJECT SCHEDULED FYP 2
WEEK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 Design the interface of PAJ Bus
Tracker Mobile Application
2 Simulate the data using
Android Studio
3 Analyse the coding of Java
Language and run the project
4 Analyse the performance of
mobile application
5 Improvement the interface of
mobile application
6. FYP2 Seminar preparation
72
APPENDIX B
The purpose of this questionnaire is to evaluate the developed system in terms of user
interface design. Your feedback is extremely valuable and useful in designing and
implementing it in the proposed system. Thank you for your time and cooperation.
73
User Interface Design
Please rate the impressiveness of the user interface design for PAJ Bus Tracker
Mobile Application System
Very Not
Functionality Impressed Impressed Average
Impressed Impressed
Font Style
Font Color
Font Layout
Background
Colour r
Button
Images
74
APPENDIX C
75
APPENDIX D
SOURCE CODE
In main activity, the source code is related about the coding function to design the map
view in this mobile application. After the map view have been successfully developed in algorithm
Mapbox.getInstance, the source code of appearing bus marker is created. Then the system will be run
again to test the algorithm correctly in “.withImage(ICON_ID,BitmapFactory.decodeResources
(MainActivity.this.getResources(),R.drawable.red_marker) to appear the bus marker. Next, the source
code to read JSON file is being developed to test the Web API given are readable from the developer.
After the data text have been read, the source code where assigned the JSON object latitude and
longitude as a bus marker is created outside the source code for read JSON file. To get the accurate
result for the bus moved in a real-time condition, the handler function is added to create some delay.
76
77
78
79
2. REGISTER SOURCE CODE
80
3. LOGOUT SOURCE CODE
81
4. LOGIN SOURCE CODE
82
5. FORGET PASSWORD SOURCE CODE
83
6. ABOUT US SOURCE CODE
84
7. CUSTOM DIALOG SOURCE CODE
85