Sie sind auf Seite 1von 30

MGM’s College of Engineering, Nanded.

Chapter 1

INTRODUCTION

In this chapter the basic introduction of Parking System or Smart Parking is described
and also the advantages and disadvantages of Smart Parking are given.

With a rapid increase in the vehicle usage in the recent past, finding and reaching a
free parking slot has become time consuming and tedious, especially in the metro
cities. This creates a necessity to introduce an automated system that allows users to
book their spot just by making a few clicks And with the advent of newer and newer
technologies this has been made possible; with the help of a mobile-based app that
helps you in locating a free parking slot and then guiding you all the way to the empty
slot found, also eliminating the conventional physical currency payment; rather
making the payment through a easy-to-use mobile application. In this chapter we are
going to see basic introduction to Parking system and advantages & disadvantages of
Parking System.
1.1. Smart Parking System
The concept for the parking system was and is driven by two factors: a need for
parking spaces and a scarcity of available land. Smart parking application that
provides real time information on parking availability. This Application allows users
to book their spot just by making a few clicks. With the help of a mobile-based app
that helps you in locating a free parking slot and then guiding you all the way to the
empty slot found.

A parking lot is an area that is assigned for parking. Normally, the parking spaces are
marked on the ground with white or yellow lines that form squares that each fit one
car. Parking lots are common near shops, bars, restaurants and other facilities that
require parking. There are parking lots that are open throughout the year, but there are
also improvised parking lots that are specially assigned for an event. The smart
parking system implemented mainly in the Europe, United States and Japan is
developed with the incorporation of advanced technologies and researches from
various academic disciplines. With its deployment in the car park, it is hoped that it
would solve the aforementioned problems faced by the patrons within the car park.

1
MGM’s College of Engineering, Nanded.

Fig1.1: Parking Area

1.1.1. Advantages & Disadvantages


 Advantages
1. It saves user time in search of parking space available in such a long
parking area.
2. The system provides a graphical view of the parking.
3. User can pay online on the spot and confirm their space.
 Disadvantages
1. It requires an internet connection.
2. It requires large database.
1.1.2. Parking Garages

A parking garages is also called car park, parking structure, parking building, parking
ramp, parkade or parking deck.

There are several types of parking garages:

1. Single level parking garage

A single level parking garage is a parking garage that only has only one floor.

2. Multilevel or multi-storey parking garage

Multilevel or multi-storey parking garages are parking garages that have multiple
floors to park at. The design of a multilevel parking garage can be very different.
The most common design is a garage with ramps to move from one level to
2
MGM’s College of Engineering, Nanded.

another. Less common are parking garages that use lifts to go from level to level.
Then there are also parking garages with robotic systems that move cars from one
level to another. The floors of the parking garage can either go up, down or both.

3. Underground parking garage

An underground parking garage has levels below the surface and none above
ground. Most often underground parking garages are located in city centers where
there’s not much space available to build a parking facility, but there is a big need
to build one.

4. Automated parking garage

The car park operates as followed: You drive your car onto a platform in the
garage. Then the automated parking system will move your car to the available
parking space somewhere in the tower. The cars can be moved vertically and
horizontally with the use of hydraulic or mechanical lifts. There are several
benefits to a multilevel parking facility with an automated parking system. For
example you can stack more cars in a compact space because the cars are parked
by robots. Also parking spaces can be smaller because no one needs to get in or
out of the vehicle and people don’t park it themselves; the robotic system doesn’t
need as much space to park a car than a human does. You do need to clean the
equipment every once in a while, plus at least one to four times a year someone
needs to check the equipment to see if it all still works properly. The number of
times for a service check depends on the equipment that is used.

1.1.3. Benefits

1. Optimized parking – Users find the best spot available, saving time, resources and
effort. The parking lot fills up efficiently and space can be utilized properly by
commercial and corporate entities.
2. Reduced traffic – Traffic flow increases as fewer cars are required to drive around
in search of an open parking space.
3. Reduced pollution – Searching for parking burns around one million barrels of oil a
day. An optimal parking solution will significantly decrease driving time, thus

3
MGM’s College of Engineering, Nanded.

lowering the amount of daily vehicle emissions and ultimately reducing the global
environmental footprint.
4. Enhanced User Experience – A smart parking solution will integrate the entire user
experience into a unified action. Driver’s payment, spot identification, location search
and time notifications all seamlessly become part of the destination arrival process.
5. Decreased Management Costs – More automation and less manual activity saves on
labor cost and resource exhaustion.

Fig1.2: Flowchart depicting overall working


1.2. Android (Operating System)

Fig 1.3: Symbol of Android

1.2.1 History

Android Inc. was founded in Palo Alto, California in October 2003 by Andy
Rubin, Rich Miner, Nick Sears, and Chris White. Rubin described the Android
project as "tremendous potential in developing smarter mobile devices that are more
aware of its owner's location and preferences". The early intentions of the company

4
MGM’s College of Engineering, Nanded.

were to develop an advanced operating system for digital cameras, and this was the
basis of its pitch to investors in April 2004. The company then decided that the
market for cameras was not large enough for its goals, and by five months later it had
diverted its efforts and was pitching Android as a handset operating system that
would rival Symbian and Microsoft Windows Mobile.

1.2.2 Applications
These are the basics of Android applications:
• Android applications are composed of one or more application components
(activities, services, content providers, and broadcast receivers)
• Each component performs a different role in the overall application behaviour,
and each one can be activated individually (even by other applications)
• The manifest file must declare all components in the application and should also
declare all application requirements, such as the minimum version of Android
required and any hardware configurations required
• Non-code application resources (images, strings, layout files, etc.) should include
alternatives for different device configurations (such as different strings for different
languages).

5
MGM’s College of Engineering, Nanded.

Chapter 2

PROGRAMMING CONCEPT

In this chapter we are going to discuss the list of different programming languages
and programming language which is used in our project i.e. Java language and also
php. The database connectivity using mysql in android is also described.

2.1 Different Programming Languages

Fig2.1: Programming Languages.

2.2 Java Language

When we consider a Java program, it can be defined as a collection of objects that


communicate via invoking each other's methods. Let us now briefly look into what
do class, object, methods, and instance variables mean.

 Object − Objects have states and behaviours. Example: A dog has states -
colour, name, breed as well as behaviour such as wagging their tail, barking,
eating. An object is an instance of a class.

 Class − A class can be defined as a template/blueprint that describes the


behaviour/state that the object of its type supports.

6
MGM’s College of Engineering, Nanded.

 Methods − A method is basically a behaviour. A class can contain many


methods. It is in methods where the logics are written, data is manipulated
and all the actions are executed.

 Instance Variables − each object has its unique set of instance variables. An
object's state is created by the values assigned to these instance variables.

2.2.1 History of Java (programming language)

Fig2.2: Java Language

James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language
project in June 1991. Java was originally designed for interactive television, but it was
too advanced for the digital cable television industry at the time. The language was
initially called Oak after an oaktree that stood outside Gosling's office. Later the
project went by the name Green and was finally renamed Java, from Java
coffee. Gosling designed Java with a C/C++-style syntax that system and application
programmers would find familiar.

Sun Microsystems released the first public implementation as Java 1.0 in 1995. It
promised "Write Once, Run Anywhere" (WORA), providing no-cost run-times on
popular platforms. Fairly secure and featuring configurable security, it allowed
network- and file-access restrictions. Major web browsers soon incorporated the
ability to run Java applets within web pages, and Java quickly became popular. The
Java 1.0 compiler was re-written in Java by Arthur van Hoff to comply strictly with
the Java 1.0 language specification. With the advent of Java 2 (released initially as
J2SE 1.2 in December 1998 – 1999), new versions had multiple configurations built

7
MGM’s College of Engineering, Nanded.

for different types of platforms. J2EE included technologies and APIs for enterprise
applications typically run in server environments, while J2ME featured APIs
optimized for mobile applications. The desktop version was renamed J2SE. In 2006,
for marketing purposes, Sun renamed new J2 versions as Java EE, Java ME, and Java
SE, respectively.

2.2.2 Java Editors

To write your Java programs, you will need a text editor. There are even more
sophisticated IDEs available in the market. But for now, you can consider one of the
following −

 Notepad − On Windows machine, you can use any simple text editor like
Notepad (Recommended for this tutorial), Text pad.

 Netbeans − A Java IDE that is open-source and free which can be


downloaded from https://www.netbeans.org/index.html.

 Eclipse − A Java IDE developed by the eclipse open-source community and


can be downloaded from https://www.eclipse.org.

2.3 PHP

The PHP Hypertext Preprocessor (PHP) is a programming language that allows web
developers to create dynamic content that interacts with databases. PHP is basically
used for developing web based software applications.

Ex:

<?php

echo "<h1>Hello, PHP!</h1>";

?>

2.3.1 History of PHP

PHP as it's known today is actually the successor to a product named PHP/FI.
Created in 1994 by Rasmus Lerdorf, the very first incarnation of PHP was a simple
set of Common Gateway Interface (CGI) binaries written in the C programming

8
MGM’s College of Engineering, Nanded.

language. Originally used for tracking visits to his online resume, he named the suite
of scripts "Personal Home Page Tools," more frequently referenced as "PHP Tools."
Over time, more functionality was desired, and Rasmus rewrote PHP Tools,
producing a much larger and richer implementation. This new model was capable of
database interaction and more, providing a framework upon which users could
develop simple dynamic web applications such as guestbooks.

2.4 MySQL
MySQL is the most popular Open Source Relational SQL Database Management
System. MySQL is one of the best RDBMS being used for developing various web-
based software applications. MySQL is developed, marketed and supported by
MySQL AB, which is a Swedish company.

2.4.1 History of Mysql

MySQL was created by a Swedish company, MySQL AB, founded by David


Axmark, Allan Larsson and Michael "Monty" Widenius. Original development of
MySQL by Widenius and Axmark began in 1994. The first version of MySQL
appeared on 23 May 1995. It was initially created for personal usage
from mSQL based on the low-level language ISAM, which the creators considered
too slow and inflexible. They created a new SQL interface, while keeping the
same API as mSQL. By keeping the API consistent with the mSQL system, many
developers were able to use MySQL instead of the (proprietarily licensed) mSQL
antecedent.

2.4.2 Connectivity with php in android

If you are working on PHP MySQL with your android app, it’s essential that you need
to test your app for correct data before moving your database, PHP files and Android
app to production. One way you can test for the same is, going live on the internet by
hosting your files with hosting provider and it’s bad idea to test your files live on the
internet. If you are using WAMP server to test your PHP files locally, Android
localhost connection and testing PHP in your mobile phone is easy.

9
MGM’s College of Engineering, Nanded.

Fig2.3: Connectivity

Open your web browser and type your computer IPv4 address and go, for
example http://192.168.1.7/. by doing so you likely to see your localhost page. Now,
you can access any page in localhost through your computer IP address.

To test your app for Android localhost connection with PHP MySQL in your android
studio emulator, just enter address as http://IP Address/ followed by path of your PHP
file in your code.

For example: http://192.168.1.7/test/example.php

10
MGM’s College of Engineering, Nanded.

Chapter 3

IMPLEMENTATION

In this chapter we are going to discuss the installation of eclipse and information
about wamp server and also the implementation of our project.

3.1 Eclipse

3.1.1 Installing the Eclipse Plug-in

You should install the ADT plug in only if you already have an Eclipse installation
that you want to continue using. Your existing Eclipse installation must meet these
requirements:

 Eclipse 3.7.2 or greater


 Eclipse ADT plug in(included in most Eclipse IDE packages)
 JDK 6 (JRE alone is not sufficient)

3.1.2 Creating an Android Project

The first step is to create a simple Android Application using Eclipse IDE. Follow the
option File -> New -> Project and finally select Android New Application wizard
from the wizard list.

Fig 3.1. :New Android Application

11
MGM’s College of Engineering, Nanded.

Next, follow the instructions provided and keep all other entries as default till the final
step. Once your project is created successfully, you will have following project
screen:

Fig 3.2 :GUI Of New App

 Anatomy of Android Application

Before you run your app, you should be aware of a few directories and files in
the Android project:

Fig3.3 :Package Explorer

12
MGM’s College of Engineering, Nanded.

Table 3.1: Description of Package Explorer

S.N. Folder, File & Description

1. Src

This contains the .java source files for your project. By default, it includes
an MainActivity.javasource file having an activity class that runs when your
app is launched using the app icon.

2. Gen

This contains the .R file, a compiler generated file that references all the
resources found in your project. You should not modify this file.

3. Bin

This folder contains the Android packages files .apk built by the ADT
during the build process and everything else needed to run an Android
application.

4. Res/drawable

This is a directory for drawable objects that are designed for density
screens.

5 Res/layout

This is a directory for files that define your app’s user interface.

6 Res/values

This is a directory for other various XML files that contain a collection of
resources, such as strings and colours definitions.

7 AndroidManifest.xml

This is the manifest file which describes the fundamental characteristics of


the app and defines each of its components.

13
MGM’s College of Engineering, Nanded.

3.2. Building Simple User Interface

The graphical user interface for an Android app is built using a hierarchy of View and
View Group objects. View objects are usually UI widgets such as buttons or text
fields. View Group objects are invisible view containers that define how the child
views are laid out, such as in a grid or a vertical list.

 Alternative Layouts

Fig3.4: Alternatives Layouts

 Create a Linear Layout

1. From the res/layout directory, open the activity_my.xml file.

The Blank Activity template you chose when you created this project includes the
activity_my.xml file with a Relative Layout root view and a Text View child view.

2. In the Preview pane, click the Hide icon to close the Preview pane.

3. Delete the <Text View> element.

4. Change the <Relative Layout> element to <Linear Layout>.

5. Add the android: orientation attribute and set it to "horizontal".

6. Remove the android: padding attributes and the tools: context attribute.

 Add a Text Field

1. In the activity_my.xml file, within the <Linear Layout> element, define an


<Edit Text> element with the distribute set to @+id/edit message.

14
MGM’s College of Engineering, Nanded.

2. Define the layout width and layout height attributes as wrap content.

3. Define a hint attribute as a string object named edit message.

 Add String Resources

1. In Android Studio, from the res/values directory, open strings.xml.

2. Add a line for a string named "edit message" with the value, "Enter a
message".

3. Add a line for a string named "button send" with the value, "Send".

You'll create the button that uses this string in the next section.

4. Remove the line for the "hello world" string.

 Add a Button

1. In Android Studio, from the res/layout directory, edit the activity_my.xml file.

2. Within the <Linear Layout> element, define a <Button> element immediately


following the <Edit Text>element.

3. Set the button's width and height attributes to "wrap content" so the button is
only as big as necessary to fit the button's text label.

4. Define the button's text label with the android: text attribute; set its value to
the button send string resource you defined in the previous section.

3.3. Running your App

3.3.1. Run on the Emulator

Whether you're using Eclipse or the command line, to run your app on the emulator
you need to first create an Android Virtual Device (AVD). An AVD is a device
configuration for the Android emulator that allows you to model a specific device.

 Create an AVD

1. Launch the Android Virtual Device Manager:

15
MGM’s College of Engineering, Nanded.

Select Tools > Android > AVD Manager, or click the AVD Manager icon in the
toolbar.

Fig 3.5: Creating AVD

2. Figure 1. The AVD Manager main screen shows your current virtual devices.

3. On the AVD Manager main screen (figure 1), click Create Virtual Device.

4. In the Select Hardware window, select a device configuration, such as


Samsung, then click Next.

5. Select the desired system version for the AVD and click Next.

6. Verify the configuration settings, and then click Finish.

3.4 Wamp Server

A fast way to get Windows, Apache, MySQL, PHP (WAMP) solution stack up and
running on Windows is to install a WAMP bundle. There are quite a few such
bundles, and they contain various extras.

WampServer refers to a software stack for the Microsoft Windows operating system,
created by Romain Bourdon and consisting of the Apache web server, OpenSSL for
SSL support, MySQL database and PHP programming language

16
MGM’s College of Engineering, Nanded.

Fig3.6: Wamp on Windows

The acronym WAMP refers to a set of free (open source) applications, combined with
Microsoft Windows, which are commonly used in Web server environments. The
WAMP stack provides developers with the four key elements of a Web
server: an operating system, database, Web server and Web scripting software. The
combined usage of these programs is called a server stack. In this stack, Microsoft
Windows is the operating system (OS), Apache is the Web server, MySQL handles
the database components, while PHP, Python, or PERL represents the dynamic
scripting languages.

17
MGM’s College of Engineering, Nanded.

Chapter 4

RESULT

In the previous chapter we have seen the implementation of application thus, in this
chapter we are going to discuss the Result of eclipse and also the snapshots of result
of project are displayed in this chapter. The snapshots are given in three sections
such as Admin, User and Database.

4.1 Admin

Following Figure Shows the login page of admin side where the username and
password is admin and admin respectively. The admin have must fill the username
and password filed and clicks on the login button.

Fig4.1: Admin Login

18
MGM’s College of Engineering, Nanded.

Following Figure Shows the page of admin Panel from where the admin can manage
the parking area activities.

Fig4.2: Admin Panel

Following Figure Shows the page of Adding New Parking area From this admin can
add new Parking area with number of slots.

Fig4.3: Adding New Parking Location

19
MGM’s College of Engineering, Nanded.

Following Figure Shows the page of details of all the parking areas.

Fig4.4: Parking Details

Following Figure Shows the page of Updating details using this page admin can
update the details.

Fig4.5: Update Details

20
MGM’s College of Engineering, Nanded.

Following Figure Shows the page where the details of pending requests are shown.

Fig4.6: Pending Request

Following figure shows email at Sender side.

Fig4.7: Sender side

21
MGM’s College of Engineering, Nanded.

Following figure shows the image of mail at receiver side.

Fig4.8: Receiver side

Following figure shows the page from which the admin can unallocate the slot.

Fig4.9: Unallocate Slot

22
MGM’s College of Engineering, Nanded.

4.2 User App

Following Figure shows first page of app there are two option user login and sign up.

Fig4.10: First page of App

Following figure shows user registration page from which new user can create an
account.

Fig4.11: User Registration

23
MGM’s College of Engineering, Nanded.

Following figure shows user login page from which user can login to their account.

Fig4.12: User Login

Following figure shows page of user panel page from where user can handle their
account activities.

Fig4.13: User Panel

24
MGM’s College of Engineering, Nanded.

When user click on new Booking button following page appears on which map is
displayed and parking areas are shown by using markers.

Fig4.14: Google Map

When user click on any parking marker following window will occur and number of
slots are displayed.

Fig4.15: Parking area

25
MGM’s College of Engineering, Nanded.

When user click on any slot button following window will appear.

Fig4.16: Payment Window

When user clicks on the arrival time text field following window will appear.

Fig4.17: Select time

26
MGM’s College of Engineering, Nanded.

When user click on the arrival date text filed following window will appear.

Fig4.18: Select Date

When user clicks on profile button following window will appear in that user profile
details are shown.

Fig4.19: User Profile

27
MGM’s College of Engineering, Nanded.

4.3 Database

Following figure shows the page of database in that table structure is shown.

Fig4.20: Parking Database

28
MGM’s College of Engineering, Nanded.

CONCLUSION

In India, the problem of parking is tremendous as there is no proper plan in place. As


compared to other countries, there is a wide difference between total number of
vehicles produced and the number of parking slots. The Smart parking system based
on Slot booking is implemented, using the Android application. Using the slot
allocation method we can book and block our own cheapest and shortest distant
parking slot. This application will majorly reduce the parking problem. This Project
shows how the parking problem at crowdy places can be handled with a well-thought
plan.

29
MGM’s College of Engineering, Nanded.

REFERENCES

[1]. Herbert Schildt, “Java: A Beginner's Guide”, 7th Edition.


[2]. Ed Burnette, “Hello, Android Introducing Google’s Mobile Development
Platform”, 4th Edition.
[3]. https://developer.android.com.
[4]. https://www.tutorialspoint.com.
[5]. https://www.w3schools.
[6]. htts://en.wikipedia.org.
[7]. https://play.google.com.

30

Das könnte Ihnen auch gefallen