You are on page 1of 89

MOBILE BASED PARKING PORTAL APPLICATION

ABSTRACT

The best solution for today’s parking problems is MOBILE BASED PARKING
PORTAL APPLICATION which can be used in big companies and shopping
malls where parking is provided in the floors. The main objective of this project is
to make an effective use of the limited parking space and provide the exact
location of the parking space for the drivers. This working model can be
effectively used in multi storied parking places where it is difficult for the human
beings to surveillance. This model can effectively work in such places and the
vehicle owners can save their time. Smart Parking mobile app helps in finding a
slot to park the vehicle using live information that is obtained from the sensors
placed in the parking area. Initially the number of available parking slot in the
parking area is calculated and the parking tickets are generated for all the parking
slots. To avoid the occupancy of already booked parking slot by a random person,
ticket-based parking slot allocation is proposed here. Detection of available
parking slot is done by using communicative method by considering the total
number of parking spaces, number of vehicles parked already, number of vehicles
waiting to park, number of vehicles that about to leave. All information’s like slot
allocation, slot direction and billing are collected by the mobile app that are placed
in each parking row and sent as a message to users’ mobile phones.

1
CHAPTER I

2
INTRODUCTION

This mobile based Parking Portal application is used to simplify the working process for the
allocating the space for each vehicle and get the amount collection details, and expense details,
find the vacant place for parking, etc. this application very useful to maintain a large no of
vehicle parking area management. This project is used to authorize the user to login into this web
application. Then we find the total area of parking, no of space in a time, and its space details…
etc., then the project describes the tariff like the rental cost for each vehicle per hour, day and
monthly wise. etc. Here very important to allocate the separate space for each vehicle. Here we
must enter the vehicle no, contact person name and contact details. Etc. then admin collect rental
collection for each vehicle and its time and vehicle details. Finally, the admin gets the
information about the expense made by admin for maintenance, parking Maintained, etc.

In the 21st century finding a free parking slot has become a mind-numbing process,
especially for people who travel in the morning to work or are following their daily routine, they
find it highly difficult and challenging to get a parking slot. Moreover, the parking slots are never
easy and provide no logical data about the availability of the spot unless the user visits it
manually. These kinds of problems are faced regularly by every individual because the factor of
uncertainty is very high and there are not many possible solutions in existence for solving the
issue that may benefit the users by saving their time or keeping their mental state happy and
carefree. In our ever-populating cities and districts to find parking space is becoming
increasingly difficult as traffic increases. Drivers have to go back and forth desperately looking
for parking spaces wasting their valuable time, fuel consumption with increased likelihood of
causing accidents. With the help of wireless network technology, we propose remote parking
monitoring and automated guidance which will help save a lot of time. In the existing system we
can see that some supervision is required for the parking system and it not fully automated. The
driver has to make sure that is parked in a spot without disturbing the convenience of others. In
most cases the main problem is finding the spot and trying to secure the spot for parking which
in turn leads to increased stress level for the person driving the vehicle Moreover, the relative
analysis of the data is structural to the implementation of the parking procedure. Nowadays, in
this busy world it’s really hard for a person to find a spot for parking. The current parking system

3
doesn’t give the user a specified parking slot inside the area. Parking in general in a long and
time-consuming process and we hope to provide a solution to alleviate this problem.

4
PROBLEM DESCRIPTION

The Current System carries out the parking system. The major complication existed was the
enormous space needed to store the data of the parking the vehicles images data to had in the
portal. Perpendicular parking is a type of parking that requires vehicle to be parked side to side,
perpendicular to an aisle or curb. This type of parking takes less space than parallel parking and
is commonly used in parking lots and garages. The Existing System wasn’t that easy to detect the
portal that is unauthorized capture was can easily access the data and misuse the data. Gathering
the images process is too difficult. Current system doesn’t contain functionalities for fast,
efficient retrieval of information and it involves a lot of paperwork and it takes lot of cost. These
works can become a big workload to the admin, so they easily get fed up. The proposed system
attempts to overcome these drawbacks.

OBJECTIVES

This application very useful to maintain a large no of vehicle parking area management.
This project is used to authorize the user to login into this Mobile application. Then we find the
total area of vehicle parking, no of vehicle in a time, and its space details…etc.,  

5
CHAPTER II

6
SYSTEM ANALYSIS
EXISTING SYSTEM
The population increased in the metropolitan cities; the usage of vehicles got increased.
Finding a parking space in most metropolitan areas, especially during the peak hours, is difficult
for drivers. In disciplinary parking may result in damage to the vehicle Thus there is a need to
provide sufficient parking spaces coupled with plenty of slots to help the user park his vehicle
safely. Basically, parking system is one of the most adopted and fastest growing solution of
smart city. Currently, most of the existing vehicle’s parks do not have a systematic system. Most
of them are manually managed and a little inefficient.

Disadvantages:

 The important and the most significant drawback is that the system is manual or
online Process.
 There are errors due to carelessness or oversight that may result in loss to the data.
 For a Company, time is very important factor.
 To maintain our Parking, time consuming is very high.
 It requires an internet connection.
 It requires large database.

7
PRPOSED SYSTEM
The proposed project is a smart parking booking system that provides customers an easy
way of reserving a parking space online. It overcomes the problem of finding a parking space in
commercial areas that unnecessary consumes time. Hence this project offers a web-based
reservation system where users can view various parking areas and select the space to view
whether space is available or not. If the booking space is available then all can book it for
specific time slot. The booked space will be marked red and will not be available for anyone else
for the specified time. This system provides an additional feature of cancelling the bookings.
User can cancel their books space anytime. Users can even make payment online via credit card.
After making payment users will get a notification on his/her phone with unique parking number
or can also check the bookings in his/her profile.

ADVANTAGES
 Users can get learn about parking areas for particular locations.
 It saves user time in search of parking space available in such a long parking area.
 The system provides a graphical view of the parking spaces.
 User can pay online on the spot and confirm their space.
 It excludes the need of human efforts for managing parking spaces.
 The system generates online bill for requested time and even sends an email.
 Cost-effective.

8
Parking Portal Space Occupied

9
CHAPTER III

10
SYSTEM REQUIREMENT SPECIFICATION

HARDWARE REQUIREMENTS

 System : Pentium IV 2.4 GHz.


 Hard Disk : 250 GB.
 Monitor : 15 VGA Colour.
 Mouse : Logitech.
 Ram : 2GB RAM.
 

SOFTWARE REQUIREMENTS
 Operating system : Windows 7
 Front End : ANDROID
 Back End : SQLLITE
 Coding : Java

11
SOFTWARE DESCRIPTION

Android operating system is the largest installed base among various mobile platforms
across the globe. Hundreds of millions of mobile devices are powered by Android in more than
190 countries of the world. It conquered around 71% of the global market share by the end of
2021, and this trend is growing bigger every other day. The company named Open Handset
Alliance developed Android for the first time that is based on the modified version of the Linux
kernel and other open-source software. Google sponsored the project at initial stages and in the
year 2005, it acquired the whole company.

In September 2008, the first Android-powered device was launched in the market.
Android dominates the mobile OS industry because of the long list of features it provides. It’s
user-friendly, has huge community support, provides a greater extent of customization, and a
large number of companies build Android-compatible smartphones. As a result, the market
observes a sharp increase in the demand for developing Android mobile applications, and with
that companies need smart developers with the right skill set. At first, the purpose of Android
was thought of as a mobile operating system. However, with the advancement of code libraries

12
and its popularity among developers of the divergent domain, Android becomes an absolute set
of software for all devices like tablets, wearables, set-top boxes, smart TVs, notebooks, etc.

Android Versions

Google first publicly announced Android in November 2007 but was released on 23
SEPTEMBER 2008 to be exact. The first device to bring Android into the market was the HTC
Dream with the version Android 1.0. Since then, Google released a lot of android versions such
as Apple Pie, Banana Bread, Cupcake, Donut, Éclair, Froyo, Gingerbread, Jellybeans, Kitkat,
Lollipop, marshmallow, Nougat, Oreo, etc. with extra functionalities and new features.

Advantages of Android Development

The Android is an open-source Operating system and hence possesses a vast community
for support.

 The design of the Android Application has guidelines from Google, which becomes easier
for developers to produce more intuitive user applications.

13
 Fragmentation gives more power to Android Applications. This means the application can
run two activities on a single screen.
 Releasing the Android application in the Google play store is easier when it is compared to
other platforms.
 Disadvantages of Android Development
 Fragmentation provides a very intuitive approach to user experience but it has some
drawbacks, where the development team needs time to adjust to the various screen sizes of
mobile smartphones that are now available in the market and invoke the particular features in
the application.
 The Android devices might vary broadly. So, the testing of the application becomes more
difficult.
 As the development and testing consume more time, the cost of the application may increase,
depending on the application’s complexity and features.

Libraries

Android includes a set of C/C++ libraries used by various components of the Android system.
These capabilities are exposed to developers through the Android application framework. Some
of the core libraries are listed below:

 System C library - a BSD-derived implementation of the standard C system library


(LIBC), tuned for embedded Linux-based devices
 Media Libraries - based on Packet Video’s Open CORE; the libraries support playback
and recording of many popular audio and video formats, as well as static image files,
including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG
 Surface Manager - manages access to the display subsystem and seamlessly composites
2D and 3D graphic layers from multiple applications
 Lib Web Core - a modern web browser engine which powers both the Android browser
and an embeddable web view
 SGL - the underlying 2D graphics engine

14
 3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either
hardware 3D acceleration (where available) or the included, highly optimized 3D
software rasterizer
 Free Type - bitmap and vector font rendering
 SQLite - a powerful and lightweight relational database engine available to all
applications

Android Runtime

Android includes a set of core libraries that provides most of the functionality available in
the core libraries of the Java programming language. Every Android application runs in its own
process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a
device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable
(.DEX) format which is optimized for minimal memory footprint. The VM is register-based, and
runs classes compiled by a Java language compiler that have been transformed into the. DEX
format by the included "dx" tool. The Dalvik VM relies on the Linux kernel for underlying
functionality such as threading and low-level memory management.

Linux Kernel

Android relies on Linux version 2.6 for core system services such as security, memory
management, process management, network stack, and driver model. The kernel also acts as an
abstraction layer between the hardware and the rest of the software stack. The Linux kernel is an
operating system kernel used by the Linux family of Unix-like operating systems. It is one of the
most prominent examples of software. The Linux kernel is released under the GNU General
Public License version 2 (GPLv2), (plus some firmware images with various licenses), and is
developed by contributors worldwide. Day-to-day development takes place on the list. The Linux
kernel was initially conceived and created by Finnish computer science student Linus Torvalds in
1991. Linux rapidly accumulated developers and users who adapted code from other free
software projects for use with the new operating system. The Linux kernel has received
contributions from thousands of programmers. Many Linux distributions have been released
based upon the Linux kernel. The Linux kernel has extensive support for and runs on many

15
virtual machine architectures both as the host operating system and as a guest operating system.
The virtual machines usually emulate Intel x86 family of processors, though in a few cases
PowerPC or ARM processors are also emulated.

At Google, the team led by Rubin developed a mobile device platform powered by the
Linux kernel. Google marketed the platform to handset makers and carriers on the premise of
providing a flexible, upgradable system. Google had lined up a series of hardware component
and software partners and signaled to carriers that it was open to various degrees of cooperation
on their part.[28][29][30]

Speculation about Google's intention to enter the mobile communications market continued to
build through December 2006. Reports from the BBC and The Wall Street Journal noted that
Google wanted its search and applications on mobile phones and it was working hard to deliver
that. Print and online media outlets soon reported rumors that Google was developing a Google-
branded handset. Some speculated that as Google was defining technical specifications, it was
showing prototypes to cell phone manufacturers and network operators.

Hardware running Android

The main supported platform for Android is the architecture. The Android OS can be used as an
operating system for cell phones, net books and tablets, including the Dell Streak, Samsung
Galaxy Tab, TV and other devices. The first commercially available phone to run the Android
operating system was the HTC Dream, released on 22 October 2008. In early 2010 Google
collaborated with HTC to launch its flagship Android device, the Nexus One. This was followed
later in 2010 with the Samsung-made Nexus S.

The early feedback on developing applications for the Android platform was mixed.
Issues cited include bugs, lack of documentation, inadequate QA infrastructure, and no public
issue-tracking system. (Google announced an issue tracker on 18 January 2008.) In December
2007, Merge Lab mobile startup founder Adam MacBeth stated, "Functionality is not there, is
poorly documented or just doesn't work... It's clearly not ready for prime time." Despite this,
Android-targeted applications began to appear the week after the platform was announced. The
first publicly available application was the Snake game The Android Dev Phone is a SIM-

16
unlocked and hardware-unlocked device that is designed for advanced developers. While
developers can use regular consumer devices purchased at retail to test and use their applications,
some developers may choose not to use a retail device, preferring an unlocked or no-contract
device. The Android software development kit (SDK) includes a comprehensive set of
development tools.[80] These include a debugger, libraries, a handset emulator (based on QEMU),
documentation, sample code, and tutorials. The SDK is downloadable on the android developer
website. Currently supported development platforms include computers running Linux (any
modern desktop Linux distribution), Mac OS X 10.4.9 or later, Windows XP or later. The
officially supported integrated development environment (IDE) is Eclipse (currently 3.5 or 3.6)
using the Android Development Tools (ADT) Plugin, though developers may use any text editor
to edit Java and XML files then use command line tools (Java Development Kit and Apache Ant
are required) to create, build and debug Android applications as well as control attached Android
devices (e.g., triggering a reboot, installing software package(s) remotely).[81]

Android applications are packaged in .APK format and stored under /data/app folder on
the Android OS (the folder is accessible to root user only for security reasons). APK package
contains .DEX files (compiled byte code files called Dalvik executables), resource files, etc.

Android Operation System

Android is an operating system based on Linux with a Java programming interface. It


provides tools, e.g., a compiler, debugger and a device emulator as well as its own Java Virtual
machine (Dalvik Virtual Machine - DVM). Android is created by the Open Handset Alliance
which is led by Google. Android uses a special virtual machine, e.g., the Dalvik Virtual
Machine. Dalvik uses special bytecode. Therefore, you cannot run standard Java bytecode on
Android. Android provides a tool "dx" which allows to convert Java Class files into "dex"
(Dalvik Executable) files. Android applications are packed into an .apk (Android Package) file
by the program "aapt" (Android Asset Packaging Tool) To simplify development Google
provides the Android Development Tools (ADT) for Eclipse . The ADT performs automatically
the conversion from class to dex files and creates the apk during deployment. Android supports
2-D and 3-D graphics using the OpenGL libraries and supports data storage in a SQLite
database.

17
Every Android applications run in its own process and under its own user id which is
generated automatically by the Android system during deployment. Therefore, the application is
isolated from other running applications and a misbehaving application cannot easily harm other
Android applications.

Download the Android SDK

n overview of the steps you must follow to set up the Android SDK:

1. Prepare your development computer and ensure it meets the system requirements.
2. Install the SDK starter package from the table above. (If you're on Windows, download
the installer for help with the initial setup.)
3. Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).
4. Add Android platforms and other components to your SDK.
5. Explore the contents of the Android SDK (optional).

To get started, download the appropriate package from the table above, then read the guide to
Installing the SDK.

Installing the SDK

Step 1. Preparing Your Development Computer

Before getting started with the Android SDK, take a moment to confirm that your development
computer meets the System Requirements. In particular, you might need to install the JDK, if
you don't have it already.

If you will be developing in Eclipse with the Android Development Tools (ADT) Plugin—the
recommended path if you are new to Android—make sure that you have a suitable version of
Eclipse installed on your computer as described in the System Requirements document. If you
need to install Eclipse, you can download it from this location:

18
The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is
recommended. Use the Eclipse update manager to install all available plugins for the Android
Development Tools (ADT) from the URL https://dl-ssl.google.com/android/eclipse/ .

 Configuration

In Eclipse open the Preferences dialog via Windows -> Preferences. Select Android and maintain
the installation path of the Android SDK.

Select Window -> Android SDK and AVD Manager from the menu.

Select available packages and select the latest version of the SDK.

Step 2. Downloading the SDK Starter Package

The SDK starter package is not a full development environment—it includes only the core SDK
Tools, which you can use to download the rest of the SDK components (such as the latest
Android platform). If you haven't already, get the latest version of the SDK starter package from
the page. If you downloaded a .zip or .tgz package (instead of the SDK installer), unpack it to a
safe location on your machine. By default, the SDK files are unpacked into a directory named
android-sdk-<machine-platform>.

If you downloaded the Windows installer (.exe file), run it now and it will check whether the
proper Java SE Development Kit (JDK) is installed (installing it, if necessary), then install the
SDK Tools into a default location (which you can modify). Make a note of the name and location
of the SDK directory on your system—you will need to refer to the SDK directory later, when
setting up the ADT plugin and when using the SDK tools from the command line.

Step 3. Installing the ADT Plugin for Eclipse

Android offers a custom plugin for the Eclipse IDE, called Android Development Tools
(ADT), that is designed to give you a powerful, integrated environment in which to build
Android applications. It extends the capabilities of Eclipse to let you quickly set up new Android
projects, create an application UI, debug your applications using the Android SDK tools, and

19
even export signed (or unsigned) APKs in order to distribute your application. In general,
developing in Eclipse with ADT is a highly recommended approach and is the fastest way to get
started with Android. If you'd like to use ADT for developing Android applications, install it
now. Read Installing the ADT Plugin for step-by-step installation instructions, then return here to
continue the last step in setting up your Android SDK.

If you prefer to work in a different IDE, you do not need to install Eclipse or ADT. Instead, you
can directly use the SDK tools to build and debug your application. The Introduction to Android
application development outlines the major steps that you need to complete when developing in
Eclipse or other IDEs.

Step 4. Adding Platforms and Other Components

The last step in setting up your SDK is using the Android SDK and AVD Manager (a tool
included in the SDK starter package) to download essential SDK components into your
development environment. The SDK uses a modular structure that separates the major parts of
the SDK—Android platform versions, add-ons, tools, samples, and documentation—into a set of
separately installable components. The SDK starter package, which you've already downloaded,
includes only a single component: the latest version of the SDK Tools. To develop an Android
application, you also need to download at least one Android platform and the associated platform
tools. You can add other components and platforms as well, which is highly recommended. If
you used the Windows installer, when you complete the installation wizard, it will launch the
Android SDK and AVD Manager with a default set of platforms and other components selected
for you to install. Simply click Install to accept the recommended set of components and install
them. You can then skip to Step 5, but we recommend you first read the section about the
Available Components to better understand the components available from the Android SDK and
AVD Manager.

BACK END: SQL LITE


SQLite is a relational database management system contained in a C programming
library. In contrast to many other database management systems, SQLite is not a client–server
database engine. Rather, it is embedded into the end program. SQLite is ACID-compliant and

20
implements most of the SQL standard, using a dynamically and weakly typed SQL syntax that
does not guarantee the domain integrity.

SQLite is a popular choice as embedded database software for local/client storage in


application software such as web browsers. It is arguably the most widely deployed database
engine, as it is used today by several widespread browsers, operating systems, and embedded
systems, among others. SQLite has bindings to many programming languages. Unlike client–
server database management systems, the SQLite engine has no standalone processes with which
the application program communicates. Instead, the SQLite library is linked in and thus becomes
an integral part of the application program. The library can also be called dynamically. The
application program uses SQLite's functionality through simple function calls, which reduce
latency in database access: function calls within a single process are more efficient than inter-
process communication. SQLite stores the entire database (definitions, tables, indices, and the
data itself) as a single cross-platform file on a host machine. It implements this simple design by
locking the entire database file during writing. SQLite read operations can be multitasked,
though writes can only be performed sequentially.

Due to the server-less design, SQLite applications require less configuration than client-
server databases. SQLite is called zero-conf because it does not require service management
(such as startup scripts) or access control based on GRANT and passwords. Access control is
handled by means of File system permissions given to the database file itself. Databases in
client-server systems use file system permissions which give access to the database files only to
the daemon process.

Another implication of the server less design is that several processes may need to be
able to write to the database file. In server-based databases, several writers will all connect to the
same daemon, which is able to handle its locks internally. SQLite on the other hand has to rely
on file-system locks. It has less knowledge of the other processes that are accessing the database
at the same time. Therefore, SQLite is not the preferred choice for write-intensive deployments.
[8] However, for simple queries with little concurrency, SQLite performance profits from
avoiding the overhead of passing its data to another process.

21
SQLite uses PostgreSQL as a reference platform. “What would PostgreSQL do” is used
to make sense of the SQL standard. One major deviation is that, with the exception of primary
keys, SQLite does not enforce type checking; the type of a value is dynamic and not strictly
constrained by the schema (although the schema will trigger a conversion when storing, if such a
conversion is potentially reversible). SQLite strives to follow Postel's Rule.

Features

SQLite implements most of the SQL-92 standard for SQL but it lacks some features. For
example, it partially provides triggers, and it can't write to views (however it provides INSTEAD
OF triggers that provide this functionality). While it provides complex queries, it still has limited
ALTER TABLE function, as it can't modify or delete columns.

SQLite uses an unusual type system for an SQL-compatible DBMS; instead of assigning
a type to a column as in most SQL database systems, types are assigned to individual values; in
language terms it is dynamically typed. Moreover, it is weakly typed in some of the same ways
that Perl is: one can insert a string into an integer column (although SQLite will try to convert the
string to an integer first, if the column's preferred type is integer). This adds flexibility to
columns, especially when bound to a dynamically typed scripting language. However, the
technique is not portable to other SQL products. A common criticism is that SQLite's type
system lacks the data integrity mechanism provided by statically typed columns in other
products. The SQLite web site describes a "strict affinity" mode, but this feature has not yet been
added. However, it can be implemented with constraints like CHECK (type of(x)='integer').
Several computer processes or threads may access the same database concurrently. Several read
accesses can be satisfied in parallel. A write access can only be satisfied if no other accesses are
currently being serviced. Otherwise, the write access fails with an error code (or can
automatically be retried until a configurable timeout expires). This concurrent access situation
would change when dealing with temporary tables. This restriction is relaxed in version 3.7 when
write-ahead logging (WAL) is turned on enabling concurrent reads and writes. SQLite version
3.7.4 first saw the addition of the FTS4(full text search) module, which features enhancements
over the older FTS3 module. FTS4 allows users to perform full text searches on documents
similar to how search engines search webpages. Version 3.8.2 added support for creating tables
without rowed, which may provide space and performance improvements Common table

22
expressions support was added to SQLite in version 3.8.3. SQLite with full Unicode function is
optional.

Development and distribution

SQLite's code is hosted with Fossil, a distributed version control system that is itself built
upon an SQLite database .A standalone command-line program is provided in SQLite's
distribution. It can be used to create a database, define tables, insert and change rows, run queries
and manage an SQLite database file. It also serves as an example for writing applications that
use the SQLite library. SQLite uses automated regression testing prior to each release. Over 2
million tests are run as part of a release's verification. Starting with the August 10, 2009 release
of SQLite 3.6.17, SQLite releases have 100% branch test coverage, one of the components of
code coverage. The tests and test harnesses are partially public domain and partially proprietary .

23
CHAPTER IV

24
SYSTEM DESIGN
INTRODUCTION
System design is the process of defining the elements of a system such as the
architecture, modules and components, the different interfaces of those components and the data
that goes through that system. It is meant to satisfy specific needs and requirements of a business
or organization through the engineering of a coherent and well-running system.
Systems design implies a systematic approach to the design of a system. It may take a
bottom-up or top-down approach, but either way the process is systematic wherein it takes into
account all related variables of the system that needs to be created—from the architecture, to the
required hardware and software, right down to the data and how it travels and transforms
throughout its travel through the system. Systems design then overlaps with systems analysis,
systems engineering and systems architecture.

The systems design approach first appeared right before World War II, when engineers
were trying to solve complex control and communications problems. They needed to be able to
standardize their work into a formal discipline with proper methods, especially for new fields
like information theory, operations research and computer science in general.

25
DATABASE DESIGN

Table Name: Register


Field name Field Type Description
User id Varchar (50) User Id
Password Varchar (50) Password
Name Varchar (50) Client name
Contact Numeric Contact
Email Varchar (50) Email
Address Varchar (50) Address

Table Name: Tariff


Field name Field Type Description
Tariff id Varchar (50) Tariff Id
Tariff name Varchar (50) Name
Cost Numeric Cost
Vehicle type Varchar (50) Contact
Parking id Numeric Park Id
Space allotment Numeric Space allocated
Date Datetime Date

Field name Field Type Description


Parking id Varchar(50) ID
Parking name Varchar (50) Parking Name
Address Varchar (50) Address
Contact Numeric Contact
Email Varchar (50) Email
Park type Varchar (50) Park Type
Space Numeric Space available
Table Name: Parking Place

Table Name: Feedback

26
Field name Field Type Description
Username Varchar (50) Name
Contact Varchar (50) Contact
Email Varchar (50) Email Id
Feedback Varchar (50) Feedback

E-RDIAGRAM
27
An entity–relationship model is the result of using a systematic process to describe and
define a subject area of business data. It does not define business process; only visualize business
data. The data is represented as components (entities) that are linked with each other by
relationships that express the dependencies and requirements between them, such as: one
building may be divided into zero or more apartments, but one apartment can only be located in
one building. The three-schema approach to software engineering uses three levels of ER models
that may be developed.

ER Diagram Symbol:
Diagram
S.NO. Types
Entity types
1.
Relationship Types
2.

Atomic attribute types


3.
Composite attribute types
4.

Multi valued attribute


5. types

6. Derived Attribute types

28
Add
Parking
Registration Login
View
parking

Mobile
Admin Parking User

Add Near by View Parking


Booking
Location Booking View
system

View View
feedback Feedback

Vehicle Out

DATA FLOW DIAGRAM

29
A two-dimensional diagram that explains how data is processed and transferred in a
system. The graphical depiction identifies each source of data and how it interacts with other
data sources to reach a common output. Individuals seeking to draft a data flow diagram must (1)
identify external inputs and outputs, (2) determine how the inputs and outputs relate to each
other, and (3) explain with graphics how these connections relate and what they result in. This
type of diagram helps business development and design teams visualize how data is processed
and identify or improve certain aspects.

Data flow Symbols:

Symbol Description

An entity. A source of data or a


destination for data.

A process or task that is


performed by the system.

A data store, a place where data


is held between processes.

A data flow.

LEVEL 0

30
The Level 0 DFD shows how the system is divided into 'sub-systems' (processes), each of
which deals with one or more of the data flows to or from an external agent, and which together
provide all of the functionality of the system as a whole. It also identifies internal data stores that
must be present in order for the system to do its job, and shows the flow of data between the
various parts of the system.

LEVEL 0:

User Homepage

Mobile
Login Parking Place

Admin Homepage

DFD LEVEL-1

31
The next stage is to create the Level 1 Data Flow Diagram. This highlights the main
functions carried out by the system. As a rule, to describe the system was using between two and
seven functions - two being a simple system and seven being a complicated system. This enables
us to keep the model manageable on screen or paper.

Home

Mobile Parking
Place

New User Registration

User Login Main page

Admin

DFD LEVEL-2

32
A Data Flow Diagram (DFD) tracks processes and their data paths within the business or
system boundary under investigation. A DFD defines each domain boundary and illustrates the
logical movement and transformation of data within the defined boundary.

DFD LEVEL-3

33
A Data Flow Diagram (DFD) tracks processes and their data paths within the business or
system boundary under investigation. A DFD defines each domain boundary and illustrates the
logical movement and transformation of data within the defined boundary.

Add Parking
Place

View Parking

Add Nearby
Place

View Booked
Admin
User Home Page
View User

View Feedback

Vehicle Out

ARCHITECTURE DIAGRAM
34
A system architecture or systems architecture is the conceptual model that defines the
structure, behavior, and more views of a system. An architecture description is a formal
description and representation of a system, organized in a way that supports reasoning about the
structures and behaviors of the system. System architecture can comprise system components,
the externally visible properties of those components, the relationships (e.g. the behavior)
between them. It can provide a plan from which products can be procured, and systems
developed, that will work together to implement the overall system. There have been efforts to
formalize languages to describe system architecture; collectively these are called architecture
description languages (ADLs).

Various organizations define systems architecture in different ways, including:

 An allocated arrangement of physical elements which provides the design solution for a
consumer product or life-cycle process intended to satisfy the requirements of the
functional architecture and the requirements baseline.
 Architecture comprises the most important, pervasive, top-level, strategic inventions,
decisions, and their associated rationales about the overall structure (i.e., essential
elements and their relationships) and associated characteristics and behavior.
 If documented, it may include information such as a detailed inventory of current
hardware, software and networking capabilities; a description of long-range plans and
priorities for future purchases, and a plan for upgrading and/or replacing dated equipment
and software processes.

Mobile Parking Portal System


35
Admin User

Add View Add Nearest Search Nearest Check


Parking Parking Place Parking Place Availabilit
Place y

Booking Feedback

View View View Vehicle


Booking Users Feedbac Out
k

UML DIAGRAM

36
The Unified Modelling Language (UML) is a general-purpose, developmental, modelling
language in the field of software engineering that is intended to provide a standard way to
visualize the design of a system.
USE CASE DIAGRAM
Use case diagrams are usually referred to as behavior diagrams used to describe a set of
actions (use cases) that some system or systems (subject) should or can perform in collaboration
with one or more external users of the system (actors).A use case diagram at its simplest is a
representation of a user's interaction with the system that shows the relationship between the user
and the different use cases in which the user is involved.

Login

Registration

Customer Details

Parking View

Parking Add

Admin User
Location Search

Booking Details

Feedback

Report
USE CASE DIAGRAM
ACTIVITY DIAGRAM

37
An activity diagram visually presents a series of actions or flow of control in a system
similar to a flowchart or a data flow diagram. Activity diagrams are often used in business
process modelling.

LOGIN

Admin User

Login
Parking Add

Parking Details Parking View

Location Search
Nearest Locaiton
Details
Booking Details
Booking Details

Feedback

Vehicle Out

SEQUENCE DIAGRAM
38
The sequence diagram is a good diagram to use to document a system's requirements and
to flush out a system's design. The reason the sequence diagram is so useful is because it shows
the interaction logic between the objects in the system in the time order that the interactions take
place. A sequence diagram shows object interactions arranged in time sequence. It depicts the
objects and classes involved in the scenario and the sequence of messages exchanged between
the objects needed to carry out the functionality of the scenario.

Admin
User

Parking View

Search Parking

Add parking

Location search

Booking
Anomaly detection
Feedback View

COLLABORATION DIAGRAM

39
A collaboration diagram, also called a communication diagram or interaction diagram, is
an illustration of the relationships and interactions among software objects in the Unified
Modelling Language (UML). UML Collaboration diagrams illustrate the relationship and
interaction between software objects. They require use cases, system operation contracts, and
domain model to already exist. The collaboration diagram illustrates messages being sent
between classes and objects (instances). A collaboration diagram shows the objects and
relationships involved in an interaction, and the sequence of messages exchanged among the
objects during the interaction.

Registration
Login
Parking Search
Nearest Location parking Place
Booking
Bill Amount
Online Payment Database
User

Login
Parking Place Add
Parking Add
Bill Amount
Authentication
User Details
Report

Admin

METHODOLOGY
40
KNN ALGORITHM
 The k-nearest neighbors (KNN) algorithm is a simple, supervised machine learning
algorithm that can be used to solve both classification and regression problems.
 It's easy to implement and understand, but has a major drawback of becoming
significantly slows as the size of that data in use grows.
 The KNN algorithm can compete with the most accurate models because it makes highly
accurate predictions.
 Therefore, you can use the KNN algorithm for applications that require high accuracy but
that do not require a human-readable model.
 The quality of the predictions depends on the distance measure.

41
CHAPTER V

PROJECT DESCRIPTION
42
MODULE DESCRIPTION

User Register

This module is designed for new users who visit this project to buy software. The new user
has to register with the proper details. This system requires a proper user authentication for
accessing the features behind in this system. For getting the rights to access the features users
have to register their identity to this system. Once registered the system will provides the
accessibility rights to the users to work in this system.

User Login
1In the login module the authenticated admin will enter the valid username and the
password to enter in the home page. This module will be accessed by the authorized user who
knows the password which is developed. This module will be the gateway module for the project
that will help to enter the data.

View Over All Parking Status

The system is derived from the idea of android. The system uses the mobile based technology
to monitor car parks. A count the percentage of free parking spaces in each car park. The use of
facilitates implementation of a large-scale system at low cost. The system provides a mechanism
to prevent disputes in the car park and helps minimize wasted time in looking for a parking
space. After logging into the system, the user can choose a suitable parking space. Information
on the selected parking location will be confirmed to the user via notification. Then, the system
updates the status of the parking space to ``pending'' during which time the system will not allow
other users to reserve it. If after a certain period of pending time the system determines that no
car is parked in that space, then it changes the status to ``available.'' The system will update the
status from the (the status of car park spaces) when a new car joins in the system. Therefore, the
status of the overall parking system is always updated in real time. The system will help plot the
parking time for each parking space in real time and can support the business with hourly
parking charges.

Book for Parking

43
After Viewing the available parking space with minimal cost, the user can book their
parking slot. The status of the booking will remain as pending until admin accept the request. In
the order booking module will enter the customer’s name, vehicle no and slot no are used to
register the booking details. The booking scheme is allowing the online also in parking booking
system. Booking the slot user can also view the parking hours list of booking. The user is booked
the vehicle parking details.

View Booked Status

Therefore, the status of the overall parking system is always updated in real time. The
system will help plot the parking time for each parking space in real time and can support the
business with hourly parking charges. The status of the booking will remain as pending until
admin accept the request. So, the user needs to check the booking status, The status will be
remain as pending until the booking accepted by the admin, After the admin accepted the status
will be change as Booked

View Parked details list

User have the permission to see the parked vehicles details from all the parking slots, this will
help to find their vehicles from a detailed vehicles report.

View and process booked details

The user requested booking details can be view to the admin, Admin is the authority to
accept the booking request, The parking status will be remain as pending until the admin
accepted by the request.

Detailed reports

Admin will provide a detailed report for further references, it will include date wise
report of parked vehicles in the parking space. This will be used for further references.

44
CHAPTER -VI

TESTING

45
System testing involves user training system testing and successful running of the
developed proposed system. The user tests the developed system and changes are made
according to their needs. The testing phase involves the testing of developed system using
various kinds of data.

An elaborate testing of data is prepared and the system is tested using the test data. While
testing, errors are noted and the corrections are made. The corrections are also noted for the
future use. The users are trained to operate the developed system.

INTRODUCTION

System testing is the stage of implementation that is aimed at ensuring that the system
works accurately and efficiently before live operation commences. Testing is vital to the success
of the system. System testing makes logical assumption that if all the parts of the system are
correct, then the goal will be successfully achieved. A series of testing are done for the proposed
system before the system is ready for the user acceptance testing.

The following are the types of Testing:

1. Unit Testing

2. Integration testing

3. Validation

4. Output testing

5. User acceptance testing

UNIT TESTING:

Unit testing focuses verification efforts on the smallest unit of the software design, the
module. This is also known as “module testing”. The modules are tested separately. This testing

46
was carried out during programming stage itself. In this testing each module is found to be
working satisfactorily as regards to the expected output from the module.

INTEGRATION TESTING:

Data can be lost across an interface: one module can have adverse efforts on another.
Integration testing is the systematic testing for construction of program structure, while at the
same time conducting tests to uncover errors associated within the interface. Here correction is
difficult because the isolation of cause is complicated by the cast expense of the entire program.
Thus, in the integration testing step, all the errors uncovered are corrected for the next testing
steps.

VALIDATION TESTING:
At the conclusion of integration testing, software is completely assembled as a package,
interfacing errors have been uncovered and corrected and a final series of software tests begins
validation test has been conducted one of the two possible conditions exists. One is the function
or performance characteristics confirm to specification and are accepted and the other is
deviation from specification is uncovered and a deficiency list is created.

SYSTEM TESTING:
After performance validation testing, the next step is output testing of the proposed
system since no system could be useful if it does not produce the required output in a specific
format. Asking the users about the format required by them tests the outputs generated by the
system under consideration. Here, the output format is considered in two ways, one is on the
screen and the other is printed format. The output format on the screen is found to be correct, as
the format was designed in the system design phase according to the user needs. For the hard
copy also, the output comes as the specified requirements by the user.

USER ACCEPTANCE TESTING:


User acceptance testing of a system is the key factor of the success of any system. The
system under study is tested for the user acceptance by constantly keeping in touch with the
prospective system users at any time of developing and making changes whenever required.

47
DEPLOYMENT

During the deployment design phase of the solution life cycle, you design a high-level
deployment architecture and a low-level implementation specification, and prepare a series of
plans and specifications necessary to implement the solution. Project approval occurs in the
deployment design phase.

The whole process has been designed for the user side to enable the standard level of
security to their important information and data that has been stored into the cloud. It develops
the administrators' performance evaluation in a better way.

MAINTENANCE

Maintainability is considered, inherent to the building system design, ensuring the ease,


accuracy, safety, and economy of maintenance tasks within that system. The purpose of
maintainability is to improve effectiveness and efficiency of maintenance.

The performance and maintenance of the system has been analyzed by the feedback
given by the customers of the system. It is major cause that helps to maintain the entire system
with enhanced methods.

48
CHAPTER VII

CONCLUSION
This proposed a parking system that improves performance by reducing the number of users
that fail to find a parking space and minimizes the costs of moving to the parking space. Our
proposed architecture and system have been successfully simulated and implemented in a real
situation. The results show that our algorithm significantly reduces the average waiting time of

49
users for parking. Our results closely agree with those of our proposed mathematical models. The
simulation of our system achieved the optimal solution when most of the vehicles successfully
found a free parking space. The average waiting time of each car park for service becomes
minimal, and the total time of each vehicle in each car park is reduced. In our future study, we
will consider the security aspects of our system as well as implement our proposed system in
large scales in the real world.

50
CHAPTER VIII

FUTURE ENHANCEMENT

The mobile based car barking system will be as smart car parking system with automatic
billing system also fully automated system using multilayer parking method. Safety measures
such as vehicle no. tracing, driver face recognition. Also, care has taken so that there is no
malfunction of wrong vehicle entering into the allocated slot by providing a unique OTP to each
person and ensuring the same person parks in the given slot.

51
BIBLIOGRAPHY
BOOKS

1. Android Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) Kindle
Edition
2. Android Design Patterns: Interaction Design Solutions for Developers Kindle Edition
3. Android User Interface Design: Turning Ideas and Sketches into Beautifully Designed
Apps (Usability) Kindle Edition

52
4. Android Recipes: A Problem-Solution Approach 1st ed. 2011 Edition
5. Android: Introducing Google's Mobile Development Platform (Pragmatic
Programmers) Third Edition Edition

Website
https://www.android.com/

http://officialandroid.blogspot.in/

http://www.androidcentral.com/

https://en.wikipedia.org/wiki/Android_%28operating_system%29

ANNEXURE I- CODING
Source Code

Adminhome.java
package com.example.carparking;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

53
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class adminhome extends Activity implements OnClickListener{
Button b1,b2,b3,b4,b5,b6,b7,b8;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.adminhome);
b1=(Button)findViewById(R.id.ahplace);
b1.setOnClickListener(this);
b2=(Button)findViewById(R.id.ahview);
b2.setOnClickListener(this);
b3=(Button)findViewById(R.id.ahnear);
b3.setOnClickListener(this);
b4=(Button)findViewById(R.id.ahbooked);
b4.setOnClickListener(this);

b5=(Button)findViewById(R.id.ahusers);
b5.setOnClickListener(this);
b6=(Button)findViewById(R.id.ahfeedback);
b6.setOnClickListener(this);
b7=(Button)findViewById(R.id.ahout);
b7.setOnClickListener(this);
b8=(Button)findViewById(R.id.ahsignout);
b8.setOnClickListener(this);
}
@Override
public void onClick(View v) {

54
// TODO Auto-generated method stub
if(v==b1)
{
Intent i=new Intent(adminhome.this,aupload.class);
startActivity(i);
}
else if(v==b2)
{
Intent i=new Intent(adminhome.this,aviewparking.class);
startActivity(i);
}
else if(v==b3)
{
Intent i=new Intent(adminhome.this,anearby.class);
startActivity(i);
}
else if(v==b4)
{
Intent i=new Intent(adminhome.this,aviewbooked.class);
startActivity(i);
}
else if(v==b5)
{
Intent i=new Intent(adminhome.this,aviewuser.class);
startActivity(i);
}
else if(v==b6)
{
Intent i=new Intent(adminhome.this,aviewfeedback.class);
startActivity(i);
}

55
else if(v==b7)
{
Intent i=new Intent(adminhome.this,aout.class);
startActivity(i);
}
else if(v==b8)
{
Intent i=new Intent(adminhome.this,login.class);
startActivity(i);
}
}
}
Neasterplace.java
package com.example.carparking;

import android.app.Activity;
import android.app.AlertDialog;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;

public class anearby extends Activity implements OnClickListener{

EditText pid,pname,address;

SQLiteDatabase db;
Button b1,b2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.anearby);
pid=(EditText)findViewById(R.id.npid);
pname=(EditText)findViewById(R.id.npname);
56
address=(EditText)findViewById(R.id.npaddress);
b1=(Button)findViewById(R.id.nplace);
b1.setOnClickListener(this);
b2=(Button)findViewById(R.id.cancel);
b2.setOnClickListener(this);

db=openOrCreateDatabase("CarParking.db", MODE_PRIVATE, null);


db.execSQL("CREATE TABLE IF NOT EXISTS NearestPlace(PID Integer,PName
VARCHAR,Address VARCHAR)");
}

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v==b1)
{

db.execSQL("INSERT INTO NearestPlace VALUES('"+pid.getText()+"','"+pname.getText()


+"','"+address.getText()+"')");
show("CarParking","Successfully Uploaded");
}
else if(v==b2)
{
clear();
}
}
private void show(String title, String message) {
// TODO Auto-generated method stub
AlertDialog.Builder b=new AlertDialog.Builder(this);
b.setTitle(title);
b.setMessage(message);
b.show();
}
public void clear()
{
pid.setText("");
pname.setText("");
address.setText("");

}
57
}

Login.java
package com.example.carparking;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.*;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class login extends Activity implements OnClickListener {

EditText t1,t2;
Button login,cancel;
SQLiteDatabase db;
TextView newuser;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
t1=(EditText)findViewById(R.id.luname);
t2=(EditText)findViewById(R.id.lpassword);
newuser=(TextView)findViewById(R.id.lnewuser);
login=(Button)findViewById(R.id.lsubmit);
cancel=(Button)findViewById(R.id.lcancel);
login.setOnClickListener(this);
cancel.setOnClickListener(this);
newuser.setOnClickListener(this);
db=openOrCreateDatabase("CarParking.db", MODE_PRIVATE, null);
}

@Override
public void onClick(View v) {

58
// TODO Auto-generated method stub
if(v==login)
{
String name=t1.getText().toString();
String pass=t2.getText().toString();

if(name.equals("Admin") && pass.equals("Admin"))


{
Intent i=new Intent(login.this,adminhome.class);
startActivity(i);
}
else
{
Cursor c=db.rawQuery("SELECT * FROM Register WHERE username='"+t1.getText()+"' and
password='"+t2.getText()+"'",null);

if(c.moveToFirst())
{
Intent i=new Intent(login.this,userhome.class);
i.putExtra("uname", t1.getText().toString());
startActivity(i);
c.close();
//db.close();

}
else
{
c.close();
show("Error","Invalid Username & Password");

clear();
}
}

}
else if(v==cancel)
{
clear();
}
else if(v==newuser)
{
59
Intent i=new Intent(login.this,registration.class);
startActivity(i);
}
}
private void clear()
{
// TODO Auto-generated method stub
t1.setText("");
t2.setText("");
}
private void show(String title, String message) {
// TODO Auto-generated method stub
AlertDialog.Builder b=new AlertDialog.Builder(this);
b.setTitle(title);
b.setMessage(message);
b.show();
}

Userregi.java
package com.example.carparking;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class registration extends Activity implements OnClickListener {

EditText t1,t2,t3,t4,t5;
Button submit,cancel;
SQLiteDatabase db;
@Override
protected void onCreate(Bundle savedInstanceState) {

60
super.onCreate(savedInstanceState);
setContentView(R.layout.registration);

t1=(EditText)findViewById(R.id.name);
t2=(EditText)findViewById(R.id.phone);
t3=(EditText)findViewById(R.id.mailid);
t4=(EditText)findViewById(R.id.username);
t5=(EditText)findViewById(R.id.password);
submit=(Button)findViewById(R.id.register);
cancel=(Button)findViewById(R.id.cancel);
submit.setOnClickListener(this);
cancel.setOnClickListener(this);
db=openOrCreateDatabase("CarParking.db", MODE_PRIVATE, null);
db.execSQL("CREATE TABLE IF NOT EXISTS Register(name VARCHAR,phone
VARCHAR,email VARCHAR,username VARCHAR,password VARCHAR)");

}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v==submit)
{
// TODO Auto-generated method stub
db.execSQL("INSERT INTO Register VALUES('"+t1.getText()+"','"+t2.getText()
+"','"+t3.getText()+"','"+t4.getText()+"','"+t5.getText()+"')");
show("CarParking","Successfully Registered");
Intent i=new Intent(registration.this,login.class);
startActivity(i);
}
if(v==cancel)
{
clear();
Intent i=new Intent(registration.this,login.class);
startActivity(i);
}
}

private void show(String title, String message) {


// TODO Auto-generated method stub
AlertDialog.Builder b=new AlertDialog.Builder(this);
b.setTitle(title);
61
b.setMessage(message);
b.show();
}
public void clear()
{
t1.setText("");
t2.setText("");
t3.setText("");
t4.setText("");
t5.setText("");

}
}

Search.java
package com.example.carparking;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.GridView;
import android.widget.Spinner;

public class usearch extends Activity implements OnClickListener {

Spinner city,type;
Button submit;
SQLiteDatabase db;
GridView grid;

@Override

62
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.usearch);

city=(Spinner)findViewById(R.id.avcity);
type=(Spinner)findViewById(R.id.avtype);
grid=(GridView)findViewById(R.id.gridView1);
submit=(Button)findViewById(R.id.aview);
submit.setOnClickListener(this);
db=openOrCreateDatabase("CarParking.db", MODE_PRIVATE, null);
}

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v==submit)
{
try
{
List<String> li=new ArrayList<String>();
li.add("Address");
li.add("ContactNo");
li.add("Amount");
li.add("PID");
Cursor c=db.rawQuery("SELECT * FROM ParkingPlace WHERE
City='"+city.getSelectedItem().toString()+"' AND Type='"+type.getSelectedItem().toString()
+"'", null);
while(c.moveToNext())
{

//li.add(c.getString(1));
li.add(c.getString(2));
//li.add(c.getString(3));
li.add(c.getString(4));
//li.add(c.getString(5));
li.add(c.getString(6));
li.add(c.getString(0));
}
ArrayAdapter<String> da=new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item,li);
da.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
63
grid.setAdapter(da);
}
catch(Exception ex)
{
show("Error",ex.getMessage());
}
}

}
private void show(String title, String message) {
// TODO Auto-generated method stub
AlertDialog.Builder b=new AlertDialog.Builder(this);
b.setTitle(title);
b.setMessage(message);
b.show();
}

Homepage.java
package com.example.carparking;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class userhome extends Activity implements OnClickListener {

Button b1,b2,b3,b4,b5,b6;
String uname;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.userhome);

64
b1=(Button)findViewById(R.id.Button1);
b1.setOnClickListener(this);

b2=(Button)findViewById(R.id.Button2);
b2.setOnClickListener(this);

b3=(Button)findViewById(R.id.Button3);
b3.setOnClickListener(this);

b4=(Button)findViewById(R.id.Button4);
b4.setOnClickListener(this);

b5=(Button)findViewById(R.id.Button5);
b5.setOnClickListener(this);

b6=(Button)findViewById(R.id.Button6);
b6.setOnClickListener(this);

Intent i=getIntent();
uname=i.getStringExtra("uname");
}

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v==b1)
{
Intent i=new Intent(userhome.this,usearch.class);
startActivity(i);
}
else if(v==b2)
{
Intent i=new Intent(userhome.this,unearby.class);
startActivity(i);
}
else if(v==b3)
{
Intent i=new Intent(userhome.this,uavailable.class);
startActivity(i);
}
else if(v==b4)
65
{
Intent i=new Intent(userhome.this,ubooking.class);
i.putExtra("uname", uname);
startActivity(i);
}
else if(v==b5)
{
Intent i=new Intent(userhome.this,ufeedback.class);
i.putExtra("uname", uname);
startActivity(i);
}
else if(v==b6)
{
Intent i=new Intent(userhome.this,login.class);
startActivity(i);
}
}

Neasrtplace.java
package com.example.carparking;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.Spinner;
public class unearby extends Activity implements OnClickListener {
EditText pid;

66
Button submit;
SQLiteDatabase db;
GridView grid;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.unearby);

pid=(EditText)findViewById(R.id.pid);

grid=(GridView)findViewById(R.id.gridView1);
submit=(Button)findViewById(R.id.uview);
ubmit.setOnClickListener(this);
db=openOrCreateDatabase("CarParking.db", MODE_PRIVATE, null);
}

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v==submit)
{
try
{
List<String> li=new ArrayList<String>();
li.add("Place");
li.add("Address");

li.add("PID");
Cursor c=db.rawQuery("SELECT * FROM NearestPlace WHERE PID='"+pid.getText()+"'",
null);
while(c.moveToNext())
{

li.add(c.getString(1));
li.add(c.getString(2));

li.add(c.getString(0));
}
ArrayAdapter<String> da=new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item,li);
67
da.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
grid.setAdapter(da);
}
catch(Exception ex)
{
show("Error",ex.getMessage());
}
}

}
private void show(String title, String message) {
// TODO Auto-generated method stub
AlertDialog.Builder b=new AlertDialog.Builder(this);
b.setTitle(title);
b.setMessage(message);
b.show();
}
}
Parkingplace.java
package com.example.carparking;

import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.app.AlertDialog;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.Spinner;

public class aviewparking extends Activity implements OnClickListener{

Spinner city,type;

68
Button submit;
SQLiteDatabase db;
GridView grid;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aviewparking);

city=(Spinner)findViewById(R.id.avcity);
type=(Spinner)findViewById(R.id.avtype);
grid=(GridView)findViewById(R.id.gridView1);
submit=(Button)findViewById(R.id.aview);

submit.setOnClickListener(this);

db=openOrCreateDatabase("CarParking.db", MODE_PRIVATE, null);

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v==submit)
{
try
{
List<String> li=new ArrayList<String>();
li.add("Address");
li.add("ContactNo");
li.add("Amount");
li.add("PID");
Cursor c=db.rawQuery("SELECT * FROM ParkingPlace WHERE
City='"+city.getSelectedItem().toString()+"' AND Type='"+type.getSelectedItem().toString()
+"'", null);
while(c.moveToNext())
{

69
//li.add(c.getString(1));
li.add(c.getString(2));
//li.add(c.getString(3));
li.add(c.getString(4));
//li.add(c.getString(5));
li.add(c.getString(6));
li.add(c.getString(0));
}
ArrayAdapter<String> da=new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item,li);
da.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
grid.setAdapter(da);
}
catch(Exception ex)
{
show("Error",ex.getMessage());
}
}

}
private void show(String title, String message) {
// TODO Auto-generated method stub
AlertDialog.Builder b=new AlertDialog.Builder(this);
b.setTitle(title);
b.setMessage(message);
b.show();
}

Userdetails.java
package com.example.carparking;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

70
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.GridView;
import android.widget.Spinner;

public class aviewuser extends Activity implements OnClickListener{

SQLiteDatabase db;
GridView grid;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aviewuser);

grid=(GridView)findViewById(R.id.gridView1);

db=openOrCreateDatabase("CarParking.db", MODE_PRIVATE, null);

try
{
List<String> li=new ArrayList<String>();
li.add("Name");
li.add("Contact");
li.add("Address");
li.add("UserName");
Cursor c=db.rawQuery("SELECT * FROM Register", null);
while(c.moveToNext())
{

li.add(c.getString(0));
li.add(c.getString(1));
li.add(c.getString(2));
li.add(c.getString(3));

71
}
ArrayAdapter<String> da=new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item,li);
da.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
grid.setAdapter(da);
}
catch(Exception ex)
{
show("Error",ex.getMessage());
}

@Override
public void onClick(View v) {
// TODO Auto-generated method stu
}
private void show(String title, String message) {
// TODO Auto-generated method stub
AlertDialog.Builder b=new AlertDialog.Builder(this);
b.setTitle(title);
b.setMessage(message);
b.show();
}

72
ANNEXURE II- SCREENSHOTS
Admin Login:

73
AdminHome:

74
Add Parking:

75
View Parking Place

76
Nearest Place Add

77
78
Booking Count Parking

79
View User Details

80
View Feedback

User Login
81
User Home

82
83
Search parking Place

Search parking Place Map

84
Search parking ID

85
86
Availabity

87
Booking Slot

Feedback
88
89

You might also like