Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
University Car ParkingApplication
GRADUATE PROJECT REPORT
Submitted to the Faculty ofthe Department of Computing SciencesTexas A&M University-Corpus Christi
Corpus Christi, Texas
In Partial Fulfillment of the Requirements for the Degree ofMaster of Science in Computer Science
By
Chinmayee LingamSummer 2018
Committee Members
Dr. Longzhuang LiCommittee Chairperson
Dr. Ajay KatangurCommittee Member
ii
ABSTRACT
Enrollments into the university have been increasing steadily. As the number
increases, various problems arise. One such problem is to find a parking spot at
the university. To make things easier for the students, faculty and the staff, it is
important to have a parking management system using mobile application.
This system can help reduce the time to find an empty parking spot. QR codes
are used in this system which can help mark the distinction between two cases. First
case is when the parking lot is empty and the other when it is full. Before entering
a lot to park, a map of the parking lot along with all the parking spot numbers are
shown. The driver can select the desired spot to park and a QR code is generated. For
the selected slot, this QR code is scanned and the chosen slot is reserved. Therefore,
we can give the the total number of empty slots and also where exact the empty
parking slot is. This helps drivers find parking easily. Another benefit is that it also
helps with traffic, such as when people keep searching for parking slots, eventually
it slows everyone down as they are driving in the lot.
1
TABLE OF CONTENTS
CHAPTER Page
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
TABLE OF CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Android applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 QR code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Other Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.1 Colorado State University . . . . . . . . . . . . . . . . . . . . . 5
1.4.2 ParkMobile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4.3 ParkMe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4.4 SFPark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 Solution - Car Parking . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5.1 Functionalities . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Project Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.8 Minimum Hardware Requirements . . . . . . . . . . . . . . . . . . . . 9
2 SYSTEM DESIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.1 Car Parking Application . . . . . . . . . . . . . . . . . . . . . 13
2.3.1.1 Login Screen . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.1.2 Registration Screen . . . . . . . . . . . . . . . . . . . . . 14
2.3.1.3 Home Screen . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.1.4 Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3.1.5 Entrance scan . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.1.6 Exit scan . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2
CHAPTER Page
2.3.1.7 Choosing the available slot . . . . . . . . . . . . . . . . . 19
2.3.1.8 Confirming availability . . . . . . . . . . . . . . . . . . . 21
2.3.1.9 Canceling . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.1.10Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3.1.11Logout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.3.2 Scanner Application . . . . . . . . . . . . . . . . . . . . . . . . 26
3 IMPLEMENTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1 Server code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1.1 Loading required dependencies into project maven . . . . . . . 27
3.2 Handling QR code logics . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.3 Android code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.3.1 Rest call to Java - this code interacts with server code . . . . . 28
3.3.2 Adds data to show parking slots . . . . . . . . . . . . . . . . . 30
3.3.3 Shows QR code to the users . . . . . . . . . . . . . . . . . . . . 30
4 TESTING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1 Login Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2 Booking twice from one account before the expiration time . . . . . . 33
4.3 Is the booking reflecting on the main screen? . . . . . . . . . . . . . . 34
4.4 Canceling a booking . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.5 Reporting a problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5 CONCLUSION AND FUTURE WORK . . . . . . . . . . . . . . . . . . . 38
5.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3
LIST OF FIGURES
FIGURE Page
1 The overview of the proposed car parking system . . . . . . . . . . . 2
2 Parkmobile app . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 System Architecture of car parking application . . . . . . . . . . . . 10
4 Class Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5 Login Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6 Registration Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7 Home screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
8 Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
9 Entrance QR code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10 Exit QR code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
11 Choosing parking slot . . . . . . . . . . . . . . . . . . . . . . . . . . 19
12 Option to Scan within the time reservation . . . . . . . . . . . . . . 20
13 De-allocating empty slots . . . . . . . . . . . . . . . . . . . . . . . . 21
14 Deallocated slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
15 Canceling a reserved slot . . . . . . . . . . . . . . . . . . . . . . . . . 23
16 Report options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
17 To Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
18 Mail sent to UPD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4
FIGURE Page
19 Scanner application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
20 Server code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
21 QR code handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
22 Rest call to java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
23 To display parking slots . . . . . . . . . . . . . . . . . . . . . . . . . 30
24 Displaying QR code to user . . . . . . . . . . . . . . . . . . . . . . . 31
25 Login Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
26 Validation error when user tries to book again before expiration . . 33
27 Available slots in all the parking lots . . . . . . . . . . . . . . . . . . 34
28 Is the booking reflecting ? . . . . . . . . . . . . . . . . . . . . . . . . 35
29 Canceling selected slot booking . . . . . . . . . . . . . . . . . . . . . 36
30 Reporting a problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
1
CHAPTER 1
INTRODUCTION
Vehicle parking monitoring and management has become a big challenge for
educational institutions with increasing enrollments, high percentage of vehicle own-
ership and decreasing parking supply results in triggering blockage of vehicles, con-
gestion, wastage of time and money [1]. A survey was conducted in 2016 by U.S.
News [5] among 215 national universities. Among these universities, the students
who had cars on campus for one school year was at 98 percent followed by 80 to 95
percent. This demographic shows the requirement for an application which provides
an easy way for anyone to park their car.
Many works involving smart parking solutions have been proposed, but in
general they do not discuss the reliability and effectiveness of their solutions [2].
The main requirements are vehicle detection and the presentation of the status of
parking spaces for the users, which are achieved using different ways [2]. The various
applications available to assist in parking are generally for shopping malls or airports.
These applications mostly use parking meters or sensors to show if any parking space
is available. It is difficult to know the exact location of an empty space using parking
meters. On the contrary, using sensors is the most effective and best method so far,
but it has it’s own disadvantage of not begin able to easily deploy in open parking
lots and its not robust enough to withstand extreme weather conditions.
To apply any of the above methods at a university is not cost effective. Thus
this project proposes the idea of using QR codes. As shown in the figure 1, a map
of the parking lot is shown at the entrance to the lot and this map can also be
accessed through a mobile application. This map has marked slots on it. The driver
2
Figure 1.: The overview of the proposed car parking system
can choose a slot in the parking lot. This selection will generate a QR code. This
generated code is scanned and the slot is reserved. When leaving the parking lot QR
code is scanned again, which frees the slot. Thus, simplifying the process of parking.
A scanner application is also developed for this project. This scanner application
will scan the QR code and update the reserved slots in the map. In the same way
a QR code is generated when exiting the parking lot. The scanner application can
again be used to scan the exiting QR code to the mark the slot empty.
In the case where another car is already parked in the selected slot, the driver
can report it. This action will provide a new page, which consists of all the other
empty slots to select for parking. The driver has an option to report the car which
is parked in his selected slot to the university police department, by uploading a
picture of the car plate number.
3
1.1 Android applications
Android is a software stack for mobile devices that includes an operating sys-
tem, middleware and key applications. An Android app is a software application
running on the Android platform. As the Android platform is built for mobile de-
vices, a typical Android app is designed for a Smartphone or a tablet PC running
on the Android OS (Android Operating System) [10]. There are four layers in an-
droid Operating System and they are- Linux, Kernel Libraries, Android Runtime
Application, and Framework Applications.
1.2 QR code
QR codes, or quick response codes, are trademark for a type of matrix or two-
dimensional barcodes, first created and introduced by Japanese corporation Denso-
Wave in 1994. QR codes can be read by camera phones. We can encode numeric,
alphanumeric byte/binary, kanji characters hold max 7,089 numeric characters and
max 4,296 alphanumeric characters worth of data [4]. QR codes are encrypted by
using symmetrical keys and decryption key can be composed from the sentence or
non meaningful characters. Encryption is performed with a bitwise XOR operation
on both data chunks using the key [4]. By performing the same operation on the
encryption the original message is retrieved. QR codes are widely used in documents,
web pages, and products for information gathering, such as email addressed, URL
and so on [6].
4
1.3 Other Approaches
• In [8], the authors have provided a dataset which consists of 695,899 images
captured from two parking lots with three different camera views and three
different variations in light i.e. images taken on a sunny day, cloudy day and
rainy day. They have tested it using LBP (Local binary patterns) and Local
phase Acquisition with SVM classifier and acquired detection rate of 99% in
the images they have used in the training phase and an accuracy of 89% in
the case of images that where not used in training phase. The main challenge,
though, lies in building a general classifier that is able to detect parking spaces
from the parking lots that were not used for training. In this sense, the best
result achieved by the texture-based classifier was about 89%. The observed
drop in terms of performance shows that additional investigation is necessary
to create classification schemes less dependent on the training set.
• In [12] proposed a street parking system (SPS) based on wireless sensor net-
works. The system can monitor the state of every parking space by deploying
a magnetic sensor node on the space. For accurately detecting a parking car, a
vehicle detection algorithm is used. An adaptive sampling mechanism is used
to reduce the energy consumption. Eighty-two sensor nodes are deployed on
the street parking spaces to evaluate the performance of SPS. By testing the
system for more than one year, it was observed that the vehicle detection ac-
curacy of the SPS is better than 98%, and the lifetime of the sensor node is
more than 5 years with a pair of 2500mAh Li batteries.
5
1.4 Related Work
Most of the parking related apps are tied to an existing system of garages,
parking meters and sensors to gauge the traffic, prices and availability of parking
spaces. A case study of the most downloaded among these apps gives a premise
to designing an application with a functional user interface and a satisfying user
experience. This sections a few mobile apps which are some of the real world examples
of parking space finders.
1.4.1 Colorado State University
CSU’s [9] parking guidance system features the installation of parking sensors
in each of the 645 covered spaces and monitors all 870 spaces in the universitys only
parking structure. A space indicator light is installed on a dropper at the front of the
parking space, offering drivers a clear view of where open spaces can be found and
what type of parking is permitted in an individual space. Different colors indicate
each spaces status and user group: green for available, red for occupied, blue for
reserved parking and purple for electric vehicle charging stations.
1.4.2 ParkMobile
ParkMobile using token system currently offers its mobile payments program
at 38 colleges and universities spanning more than 75,000 parking spaces around the
country [7]. As shown in figure 2 one can check the proposed parking zone based
on your GPS location and one has to press start to start your parking session. You
can also manually enter a parking zone (the parking zone number on the meter or
area sign) or choose a zone from your favorites. There is also an option to pay the
parking fee in the application itself.
6
Figure 2.: Parkmobile app
1.4.3 ParkMe
ParkMe boasts the largest parking database encompassing many cities around
the world. ParkMe [3] instead of installing new sensors uses existing infrastructure,
human researchers and parking lot operators to keep its data accurate. The ParkMe
app has a map view with a few buttons on the title bar and on the tab bar. The
ParkMe button is the prominent one on the tab bar which allows users to search for
parking availability and prices based on the drivers current location. Alternatively
the location can be searched ahead of travel.
The app also shows the total price based for the duration, the car was parked
for. Other useful features include Parking Timer, Mark My Car and Find My Car.
Parking Timer allows the user to set a timer to alert for parking time limit. Mark
My Car marks the current GPS location so that the driver can use Find My Car
7
to locate the car on the street or in the parking lot. This feature can be combined
with the timer. The ParkMe button is customizable to set the availability of parking
based on certain preferences such as user parking spaces or cheaper prices.
1.4.4 SFPark
SFPark [11] is an application created and maintained by the San Francisco
Municipal Transport Authority to facilitate improved parking in the San Francisco
area. The real time information about vacant parking spaces is reported to drivers
for quickly parking their vehicles. The prices of the spaces are adjusted based on the
demand and use in a given area. Demand-responsive pricing encourages drivers to
park in underused areas and garages, reducing demand in overused areas. SFPark
[11] uses sensors and parking meters to log information about parking vacancies to
a central system. The drivers can look up the information through the mobile app.
The city uses microwave pucks and base stations, when a vehicle moves to break the
connection between the sensor and base station. This signals a car is present. The
SFPark app displays a map of San Francisco. The tab bar at the bottom contains
two buttons, Availability and Price. The availability map displays the availability
of street parking using colored lines on streets on the map. A color legend is shown
at the top with red being the lowest, navy blue for medium and blue for indicating
highest availability. Similarly, the price map displays the city map overlaid with
colored lines based on the pricing of parking spaces. Dark green corresponds to the
most expensive while light green for least expensive. The dots on the colored line
shows an estimate of the number of available spaces on that street or the price per
hour depending on which map the driver views. The reload button on the top-right
refreshes the data from the server.
8
1.5 Solution - Car Parking
Most existing systems are not cost efficient or easy to implement. Some of
the applications do not provide the exact slot to park. Thus, the proposed system
overcomes these disadvantages.
1.5.1 Functionalities
The following are some functionalities:
• The basic functionality provided by the system is an easy way to find parking.
• Option which helps the driver to choose where he can park.
• All the parkings lots and the number of available parking slots are displayed.
• If a car is already parked at the selected slot, other available parking lots are
displayed to choose from.
• In the case where a car is already parked in a selected slot, a photo of the
wrongly parked car can be send to university police department.
1.6 Project Scope
In the past five years, the usage of smartphones has been increasing rapidly.
Most of people are using android mobile devices which in turn enhances the scope
for developing Android applications. Android is an open source platform, and this
project is designed for android mobile devices. The application is used to select a
parking slot even before entering the lot for parking. This application is compati-
ble with several versions of Android ranging from Android 5.0 - Lollipop to recent
Android 7.0 - Nougat.
9
1.7 Software Requirements
1. Operating System
• Windows
2. Database
• My SQL
• Amazon web server
3. Integrated Development Environment
• Android Studio
4. Programming Language
• Java
• Android
1.8 Minimum Hardware Requirements
• Ram: 1 GB
• Hard disk space: 50 GB
10
CHAPTER 2
SYSTEM DESIGN
2.1 System Architecture
Figure 3 shows the system architecture of the application. The system ar-
chitecture consists of mainly two parts; one is client(android) and the other is a
server. It is comprised of XML, FCM (Firebase Cloud Messaging) service layer,
Apache HTTP Client, GSON Library, Easy image, Type Face, Card View, Java
REST Client, REST services (Representational State Transfer), JSON (JavaScript
Object Notation), Controller, Service Layer, JACKSON and Centralized database.
Figure 3.: System Architecture of car parking application
The server is implemented using REST service and JSON parser is used for
11
parsing service. JSON objects are sent across communication channels for application
in mobile devices. For data input, the client has an android user interface to perform
activities. Service layer is used for getting the result from GSON and will send the
result to view. Apache HTTP client and Java REST client are used for writing code
for connections. All requests that are received by the client are sent to the controller
of server through REST service. Service layer in the server is used for implementing
all databases. Finally, the data obtained by the JSON object is displayed in the user
interface of Android.
12
2.2 Class Diagram
Figure 4 describes the structure of the system by making use of classes of the
system, their attributes, methods, and relation between the objects. The following
section 2.4 will explain each of the classes in the class diagram in detail.
Figure 4.: Class Diagram
13
2.3 User Interface
It is the place where the user interacts with the system. The execution flow
of the car parking application is further proposed in this section.
2.3.1 Car Parking Application
This application contains all the parking lots, generated QR codes and options
to report to University police department (UPD).
2.3.1.1 Login Screen
The login screen is used for user authentication. It is used to prevent unau-
thorized uses access to the application. Figure 5 shows the login screen. The user
can access the account using user name and password.
Figure 5.: Login Screen
14
2.3.1.2 Registration Screen
Figure 6 is the registration screen. A new user should first register with the
application. To complete the registration process, certain details must be provided
by the user. These details are full name, user name, password, A-number and e-mail
id. These details are used to identify the user.
Figure 6.: Registration Screen
15
2.3.1.3 Home Screen
The home screen as shown in figure 7 is the first screen that the user sees
when they log in to the application. This screen shows all the parking lots available
on the campus. Each of these parking lots has a corresponding number beside them.
Indicating the number of available parking lots at that instance. The hamburger
icon on the top left corner displays the menu of the application and the top right
ellipsis icon provides an option to log out.
Figure 7.: Home screen
As soon as the user clicks on the parking lot of their selection, the next page for
parking slot selection is displayed.
16
2.3.1.4 Menu
Figure 8 shows the functionalities provided in the menu, for this application.
The Entrance Scanning option, contains the entrance parking QR code. The Exit
Scanning has the exit QR code. Report issues is used to notify University police
department (UPD) about cars parked in wrong slots. The parking history contains
the details of their parking over a period of time and Your Reports has all the users
reports.
Figure 8.: Menu
17
2.3.1.5 Entrance scan
Figure 9 shows the QR code generated at the entrance of the parking lot
and also the conformation message after the QR code is scanned, using the scanner
application.
Figure 9.: Entrance QR code
18
2.3.1.6 Exit scan
Figure 10 shows the QR code at the exit. This code is generated only when
the entrance code is scanned at the beginning.
Figure 10.: Exit QR code
19
2.3.1.7 Choosing the available slot
This screen as shown in figure 11 displays all the available slots for selection.
The slots are distinguished in different colors. The blue slots are for reserved park-
ing, the Grey slots indicate slots available for parking, the red slots indicates the
selected slot by the user and the black slots are for already reserved slots by other
users. The screen also shows the surrounding buildings. After the selection, the
user can proceed to scan their QR code. After selecting a slot, a dialog is displayed
Figure 11.: Choosing parking slot
which contains information regarding how long the parking is reserved. In this app
we choose the time reserved for a slot as 15 minutes. As shown in figure 12 along
with it, two options are provided to the user. One is to Scan later and the other
is to scan now. Scan now will take the user directly to the page where QR code is
provided.
20
Figure 9 is the page that will appear, when the scan now option is selected. If
this QR code is not scanned within 15 minutes then the reservation is canceled. The
reservation must be done again.
Figure 12.: Option to Scan within the time reservation
21
2.3.1.8 Confirming availability
In situations like when a car was parked without scanning the entrance QR
code or the car left parking lot, without the exit scanning; the system will never
know if the slot is empty or not. As shown in figure 13 , when the user from slot
5 is leaving, he can answer questions as shown in figure 13. Thus in this way, the
wrongly reserved slots can be unreserved again as shown in figure 14.
Figure 13.: De-allocating empty slots
22
As shown in the figure 14 the slot 2 is deallocated again as the user who is exit-
ing the 5th slot confirmed that it is empty and the 10th slot is still reserved as it
was not empty.
Figure 14.: Deallocated slot
23
2.3.1.9 Canceling
Figure 15 shows the option to cancel after the selection of the slot. After
canceling, that particular slot goes back to the Grey color, i.e. it can be reserved
again.
Figure 15.: Canceling a reserved slot
24
2.3.1.10 Reporting
The user can report the slot that they booked as shown in figures 16 and 17.
In the case where a car is already parked in the user selected slot, the report button
can be used. Using this report button the user can click a picture of the already
parked car and send it to university police department, for necessary action. From
here the user is redirected to the home page, where they can select another available
slot. Figure 18 shows the mail that is send to the UPD.
Figure 16.: Report options
25
Figure 17.: To Report
Figure 18.: Mail sent to UPD
26
2.3.1.11 Logout
When the user has finished using the application, they can click on the log
out button. To use the application again, the user has to log in again.
2.3.2 Scanner Application
This application is used to scan the QR codes generated at the entrance and
the exit of the parking lot. After scanning, confirmation messages are displayed. Fig-
ure 19 shows scanning of the QR code and conformation messages after the entrance
scan and the exit scan.
Figure 19.: Scanner application
27
CHAPTER 3
IMPLEMENTATION
3.1 Server code
3.1.1 Loading required dependencies into project maven
Figure 20 shows loading of spring project dependencies into pom.xml. Starters
are a set of convenient dependency descriptors that you can include in your appli-
cation. You get a one-stop shop for all the Spring and related technologies that
you need without having to hunt through sample code and copy-paste loads of de-
pendency descriptors. Starter for building web, including REST, applications using
Spring MVC, uses Tomcat as the default embedded container.
Figure 20.: Server code
28
3.2 Handling QR code logics
Figure 21 shows how to get the QR code and validate it. It also gets the user
to whom qr code is assigned to. It validates if the QR code is scanned and after
scanning if it is the correct QR code for that respective parking slot. All the other
validations are performed using this logic.
Figure 21.: QR code handling
3.3 Android code
3.3.1 Rest call to Java - this code interacts with server code
Figure 22 shows the interaction with the server code. Apache HttpClient is
a robust and complete solution Java library to perform HTTP operations, including
RESTful service. In this implementation, we show you how to create a RESTful
29
Java client with Apache HttpClient, to perform a GET and POST request. If we
end the request; It will immediately return the response in HttpResponse object and
we convert it into json format.
Figure 22.: Rest call to java
30
3.3.2 Adds data to show parking slots
Figure 23 is an implementation to display all the parking lots. Each lot with
all its slots are displayed with this help of this logic.
Figure 23.: To display parking slots
3.3.3 Shows QR code to the users
Figure 24 is used to provide the QR code to the user. The QR code is present
in the menu options. There are two different types of QR codes. First one is the
entrance QR code and the other is the exiting QR code.
31
Each slot in the every parking lot has a unique QR code. This QR code contains
information about the user, slot number and which parking lot is the slot in.
Figure 24.: Displaying QR code to user
32
CHAPTER 4
TESTING
In this section, all the functionalities of the application are tested under vari-
ous scenarios. This application is mainly tested using Motorola phone with Android
7.0.
4.1 Login Validation
The login page is the first page the user sees when they open the application.
The user is asked to provide the username and password. They should provide
correct credentials. If the correct credentials are not provided, a user cannot access
the application as shown in the figure 25.
Figure 25.: Login Validation
33
4.2 Booking twice from one account before the expiration time
The user can select a slot in their desired parking lot. After this selection, the
user is asked to scan the generated QR code now or later. This QR code is available
to them for 15 minutes, after which the QR code expires. Before this expiration, if
the user wants to book another slot, they are shown in the figure 26. This shows
that they cannot book another slots before the expiration time.
Figure 26.: Validation error when user tries to book again before expiration
34
4.3 Is the booking reflecting on the main screen?
The main screen of the application in the figure 27 has all the parking lots
on campus and corresponding to it is the number of slots available at that moment.
After the selection of the desired slot from a parking lot, the main screen shows a
decrease in the available slots.
Figure 27.: Available slots in all the parking lots
35
The Jelly Fish parking lot has 100 available slots as shown in figure 28. After
booking a slot the number decreases to 99 as shown in figure 27 for Jelly Fish parking
lot.
Figure 28.: Is the booking reflecting ?
36
4.4 Canceling a booking
When the user cancels their booking, the parking slot is de-allocated. Figure
29 shows an increase in Jelly Fish parking, after the cancellation of the previously
selected slot booking.
Figure 29.: Canceling selected slot booking
37
4.5 Reporting a problem
In a case where a car is already parked in a user selected slot, the user can
send a photo to the university police department (UPD) and select a different slot
to park. Figures 30 shows that the camera can be accessed and an e-mail being sent
to the UPD.
Figure 30.: Reporting a problem
38
CHAPTER 5
CONCLUSION AND FUTURE WORK
5.1 Conclusion
Car parking is an android application developed to make university parking
convenient. The main functionality of the application is to show exactly which slots
on various parking lots are available for park. This is achieved with the help of QR
codes. The user must scan the QR code provided to them in the menu options, when
they are parking and again when they are exiting. This simplifies the whole parking
process.
5.2 Future work
The following functions will help improve the application:
• The parking history collected in this application, can be used to make statistics
and can notify to the user, that their usual parking lot has free slots at that
moment.
• The application can provide an option to certain professors or employees to
select their own reserved parking.
• Provide-ability for user to link their account with islander account. By doing
so they can access their sail account using this platform and buy their parking
pass for the semester.
• A map with directions can be provided to the user from the entrance to the
parking slot.
39
REFERENCES
[1] Aalsalem, M. Y., and Khan, W. Z. Campussense a smart vehicle parking
monitoring and management system using anpr cameras and android phones.
In 2017 19th International Conference on Advanced Communication Technology
(ICACT) (2017).
[2] Araujo, A., Rubem Kalebe, . G. G., Filho, I., Gonc, K., alves, and
Neto, B. Reliability analysis of an iot-based smart parking application for
smart cities. In 2017 IEEE International Conference on Big Data (BIGDATA)
(2017).
[3] Company, A. I. ParkMe. https://www.parkme.com/, 2011-2016 ParkMe Inc.
[4] Dudheria, R. Evaluating features and effectiveness of secure qr code scanners.
In 2017 International Conference on Cyber-Enabled Distributed Computing and
Knowledge Discovery (2017), p. 40.
[5] Friedman, J. Universities where the most students bring
cars to campus. https://www.usnews.com/education/
best-colleges/the-short-list-college/articles/2016-10-11/
universities-where-the-most-students-bring-cars-to-campus, 2016.
U.S. News & World Report L.P.
[6] Liu, K.-C., Wu, C.-H., and Tseng, S.-Y. Voice helper: A mobile assistive
system for visually impaired persons. In 2015 IEEE International Conference on
Computer and Information Technology; Ubiquitous Computing and Communi-
cations; Dependable, Autonomic and Secure Computing; Pervasive Intelligence
and Computing (2015).
40
[7] Parkmobile. Parkmobile is helping spark the parking revolution on college and
university campuses across the country. http://us.parkmobile.com/news/
parkmobile-helping-spark-parking-revolution-college-and-university-campuses-across-country-use,
2015. Parkmobile, LLC.
[8] Paulo R.L.de Almeida, Luiz S.Oliveira, A. S. E. J. A. L. Pklota robust
dataset for parking lot classification. 2015 Expert Systems with Applications 42
(2015), 4937–4949.
[9] Phillips, S. Colorado state university completes new green parking ini-
tiative. https://www.businesswire.com/news/home/20151201005294/en/
Colorado-State-University-Completes-New-Green-Parking, 2015. BUSI-
NESS WIRE L.P.
[10] Prof.R.S.Sandhya Devi, Dr.V.R.Vijay Kumar, S. Application devel-
opment for reservation based parking slot allotment and management system
using android. 2017 International Conference on Innovations in Information,
Embedded and Communication Systems (ICIIECS) (2017).
[11] SFMTA. SFparking. http://sfpark.org/.
[12] Zusheng Zhang, Xiaoyun Li, H. Y. F. Y. A street parking system using
wireless sensor networks. International Journal of Distributed Sensor Networks
2013 .