SlideShare a Scribd company logo
CHAPTER - I
INTRODUCTION
1.1 Organization Profile
1.2 Abstract
In the EXISTING SYSTEM, there is no tracking of Buses happening. GPS
based Vehicle is only the solution but still arrival Timing of the Buses are not
intimated to the bus stop. In the PROPOSED MODEL, GPS Hardware installed
in the Bus Passengers Mobile Phone or in the Drivers Mobile Phone is used for
Tracking of the Buses. This GPS will Transmit it’s Longitude and Latitude
Location Values to the Centralized Server via GPRS. Android Application is
Created for the User’s Querying System for Tracking the Corresponding Buses.
User will be giving Starting and Destination Place via Android Phone to the
Server. In the MODIFICATION Part, We implement any one of the following
Concepts. First one is using GPS based implementation, second one using Zigbee .
One Zigbee is attached with the bus and another Zigbee is attached with the
Vehicle. Once the vehicle crosses the Bus Stop corresponding IR Value is
Transmitted to Server through Zigbee Communication. In the Third
Implementation, We implement the same process using prototype manner with
Graphical Path Virtualisation. Once the Bus starts from the Bus Depot it intimates
to the nearest Bus Stop as it is approaching, Buses will be moving in a Map where
it’s Position will be Transmitted to the Server as and then. In All the Three
implementation, Android Part will be same. Android Mobile user can send the
request of his / her Source and Destination of the Route so that the Server will
identify the Nearest bus and the Time taken for the us bus to reach the requested
stop. So that the Mobile user can plan his / her Travel according to the timing of
the arrival of Bus.
1
1.3 Problem Definition
CHAPTER - II
SYSTEM ANALYSIS
2.1 Existing System
there is no tracking of Buses happening. GPS based Vehicle is only
the solution but still arrival Timing of the Buses are not intimated to the bus stop.
2.2 Proposed System
2
GPS Hardware installed in the Bus Passengers Mobile Phone or in the
Drivers Mobile Phone is used for Tracking of the Buses. This GPS will Transmit
it’s Longitude and Latitude Location Values to the Centralized Server via GPRS.
Android Application is Created for the User’s Querying System for Tracking the
Corresponding Buses. User will be giving Starting and Destination Place via
Android Phone to the Server.
IMPLEMENTATION PART :
METHOD : 1
First one is using GPS based implementation. Android Phone’s GPS Hardware is
used for tracking the Vehicle. We will be having two Android Phones. One is for
Tracking the Vehicle using GPS installed in the Android. Another is used for the
User Request. There will be Three parts in this Implementation. Vehicle part is to
communicate with the Server for continuous Tracking. Server part is to fetch all
the Vehicles Current Positions and update them one by one as well as to handle
and Responding the User’s Bus Query via Android Phone. Android Mobile user
can send the request of his / her Source and Destination of the Route so that the
Server will identify the Nearest bus and the Time taken for the us bus to reach the
requested stop. So that the Mobile user can plan his / her Travel according to the
timing of the arrival of Bus.
METHOD : 2
The second part is using Zigbee . One Zigbee is attached with the bus and another
Zigbee is attached with the Vehicle. Once the vehicle crosses the Bus Stop
corresponding IR Value is Transmitted to Server through Zigbee
Communication.We build the Prototype car Implementation. This vehicle will be
mobilizing in any Route and IR Trasnmitters are installed all along the Bus Stops
of that Route. Once the Vehicle reached the Bus Stop, IR Transmitter installed in
that Bus Stop will Transmit a Signal to the IR Receiver installed in the Vehicle.
Vehicle will be moving in route where IR Transmitters are installed. This Vehicle
communicates with the Every IR Transmitters installed in the Bus Stop.
Corresponding Bus Stop ID is transmitted to the Server. Android Mobile user can
send the request of his / her Source and Destination of the Route so that the Server
will identify the Nearest bus and the Time taken for the us bus to reach the
3
requested stop. So that the Mobile user can plan his / her Travel according to the
timing of the arrival of Bus. Once User sends the request to the Server about the
Destination, Server will update with Nearest Bus, Arrival Time and Distance
between User and the Vehicle to the Android User. User can Plan the Travel
accordingly.
METHOD : 3
In the Third Implementation, We implement the same process using prototype
manner with Graphical Path Virtualisation. Once the Bus starts from the Bus Depot
it intimates to the nearest Bus Stop as it is approaching, Buses will be moving in a
Map where it’s Position will be Transmitted to the Server as and then. Android
Mobile user can send the request of his / her Source and Destination of the Route
so that the Server will identify the Nearest bus and the Time taken for the us bus to
reach the requested stop. So that the Mobile user can plan his / her Travel
according to the timing of the arrival of Bus. Once User sends the request to the
Server about the Destination, Server will update with Nearest Bus, Arrival Time
and Distance between User and the Vehicle to the Android User. User can Plan the
Travel accordingly.
2.3 User Interface Requirements
SOFTWARE REQUIREMENTS:
4
• Platform :Windows XP
• Front End : Java JDK1.5.
• Back End :MY SQL
• IDE :Eclipse
• ANDROID OS
HARDWARE REQUIREMENTS:
Processor : Intel Core 2 Duo processor (2.2 GHz)
Hard disk : 500 GB
RAM : 2 GB DDR
Android Phones : 2 Numbers
2.3.1 Modules
1. Android User
2. Bus Monitoring Server
3. Embedded Hardware Construction
4. Zigbee Communication Setup
5. Android Bus Query System
6. Nearest Bus Detection System
Android User
Mobile Client is an Android application which created and installed in the User’s
Android Mobile Phone. So that we can perform the activities. The Application First
5
Page Consist of the User registration Process. We’ll create the User Login Page by
Button and Text Field Class in the Android. While creating the Android
Application, we have to design the page by dragging the tools like Button, Text
field, and Radio Button. Once we designed the page we have to write the codes for
each. Once we create the full mobile application, it will generated as Android
Platform Kit (APK) file. This APK file will be installed in the User’s Mobile Phone an
Application.
Bus Monitoring Server
The Server will monitor the entire bus route’s information in their database and
verify them if required. Also the Server will store the entire bus route’s
information in their database. Also the Server has to establish the connection to
communicate with the Android Users. The Server will update the each route’s
activities in its database.
Embedded Hardware Construction
In this module we are going to interfaced the Embedded Kit, by which NFC values
can be observed. And NFC is communication via zigbee network is interfaced with
the Microcontroller. So that the device can obtain the values
Zigbee Communication Setup
6
The ZigBee Alliance is an association of companies working together to define an
open global standard for making low-power wireless networks. The intended
outcome of ZigBee Alliance is to create a specification defining how to build
different network topologies with data security features and interoperable
application profiles. in this every bus equipped with the Zigbee device so it create
communication with every bus stop terminal
Android Bus Query System
In the daily operation of a bus system, the movement of vehicles is affected by
uncertain conditions as the day progresses, such as traffic congestion, unexpected
delays, and randomness in passenger demand, irregular vehicle dispatching times,
and incidents. In a real-time setting, researchers have devoted significant effort
to developing flexible control strategies using android so that user can make query
about the bus details through the android phone to the get the details for the
destination route, depending on the specific features of public transport systems
Nearest Bus Detection System
A Real-Time Passenger Information System uses a variety of technologies to track
the locations of buses in real time and uses this information to generate
predictions of bus arrivals at stops along the route When this information is
disseminated to passengers by wired or wireless media, they can spend their time
efficiently and reach the bus stop just before the bus arrives, or take alternate
7
means of transport if the bus is delayed. They can even plan their journeys long
before they actually undertake them. This will make the public transport system
competitive and passenger- friendly
2.4 Feasibility Study
The feasibility of the project is analyzed in this phase and business proposal is put forth
with a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the proposed
system is not a burden to the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.
2.4.1 Economical Feasibility
This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development
of the system is limited. The expenditures must be justified. Thus the developed system as well
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products had to be purchased.
2.4.2 Technical Feasibility
This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on the available
technical resources. This will lead to high demands on the available technical resources. This
8
will lead to high demands being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing this system.
2.4.3 Social Feasibility
The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity.
CHAPTER - III
DEVELOPMENT ENVIRONMENT
3.1 Hardware Environment
The hardware requirements may serve as the basis for a contract for the implementation
of the system and should therefore be a complete and consistent specification of the whole
system. They are used by software engineers as the starting point for the system design. It shows
what the systems do and not how it should be implemented.
• Hard disk : 120 GB
• Monitor : 15’ color with vgi card support
• Ram : Minimum 256 MB
• Processor : Pentium iv and above (or) equivalent
• Processor speed : Minimum 500 MHZ
• Phone : Android
3.2 Software Environment
9
The software requirements are the specification of the system. It should include both a
definition and a specification of requirements. It is a set of what the system should do rather than
how it should do it. The software requirements provide a basis for creating the software
requirements specification. It is useful in estimating cost, planning team activities, performing
tasks and tracking the team’s and tracking the team’s progress throughout the development
activity.
• Operating system : Windows XP
• Languages : Java
• Mobile Technology : Android
• IDE : Eclipse
• Develop tool : SDK
CHAPTER - IV
SYSTEM DESIGN
4.1.2 UML Diagram
UML is simply anther graphical representation of a common semantic model. UML
provides a comprehensive notation for the full lifecycle of object-oriented development.
ADVANTAGES
10
• To represent complete systems (instead of only the software portion) using
object oriented concepts
• To establish an explicit coupling between concepts and executable code
• To take into account the scaling factors that are inherent to complex and critical
systems
• To creating a modeling language usable by both humans and machines
UML defines several models for representing systems
• The class model captures the static structure
• The state model expresses the dynamic behavior of objects
• The use case model describes the requirements of the user
• The interaction model represents the scenarios and messages flows
• The implementation model shows the work units
4.1.2.1 Use Case Diagram
Use case diagrams overview the usage requirement for system. they are useful for presentations
to management and/or project stakeholders, but for actual development you will find that use
cases provide significantly more value because they describe “the meant” of the actual
requirements. A use case describes a sequence of action that provide something of measurable
value to an action and is drawn as a horizontal ellipse
11
User
Embedded Hardware Construction
Zigbee Communication Setup
Android Bus Query System
Nearest Bus Detection System
Server
Figure 4.1.2.1 Use Case Diagram
4.1.2.2 Class Diagram
12
Android User
String Username
String password
String ip
submit()
Server
String ip
String location
connect()
BusTracking
String busid
String location
track()
Figure 4.1.2.2 Class Diagram
4.1.2.3 Sequence Diagram
Sequence diagram model the flow of logic within your system in a visual
manner, enabling you both to document and validate your logic, and commonly used for
both analysis and design purpose. Sequence diagram are the most popular UML artifact
for dynamic modeling, which focuses on identifying the behavior within your system.
13
UserUser Embedded Hardware
Construction
Embedded Hardware
Construction
Android Bus
Query System
Android Bus
Query System
Nearest Bus
Detection System
Nearest Bus
Detection System
ServerServer
1:
2:
3:
4:
Figure 4.1.2.3 Sequence Diagram
4.1.2.4 Collaboration Diagram
Another type of interaction diagram is the collaboration diagram. A collaboration
diagram represents a collaboration, which is a set of objects related in a particular
context, and interaction, which is a set of messages exchange among the objects within
the collaboration to achieve a desired outcome.
14
User Embedded Hardware
Construction
Android Bus
Query System
Nearest Bus
Detection System
Server
1: 2:
3:
4:
Figure 4.1.2.4 Collaboration Diagram
4.1.2.5 Activity Diagram
Activity diagram are graphical representations of workflows of stepwise activities and actions
with support for choice, iteration and concurrency. The activity diagrams can be used to describe
the business and operational step-by-step workflows of components in a system. Activity
diagram consist of Initial node, activity final node and activities in between.
15
User
Embedded hardware
Construction
Zigbee Communication
Setup
Android Bus
Query System
Nearest Bus
Detection System
Result
Figure 4.1.2.5 Activity Diagram
16
4.1.3 Data Flow Diagram
17
Mobile User
BUS
Request
Centralized
Server
CHAPTER - V
ARCHITECTURAL DETAILS
Overview of the MySQL Database Management System
What is MySQL?
MySQL, the most popular Open Source SQL database management system, is developed,
distributed, and supported by Oracle Corporation. The MySQL Web site
(http://www.mysql.com/) provides the latest information about MySQL software.
 MySQL, the most popular Open Source SQL database management system, is developed,
distributed, and supported by MySQL AB. MySQL AB is a commercial company,
founded in 1995 by the MySQL developers. It is a second generation Open Source
company that unites Open Source values and methodology with a successful business
model.
 The MySQL® software delivers a very fast, multi-threaded, multi-user, and robust SQL
(Structured Query Language) database server. MySQL Server is intended for mission-
critical, heavy-load production systems as well as for embedding into mass-deployed
software. MySQL is a registered trademark of MySQL AB.
 The MySQL software is Dual Licensed. Users can choose to use the MySQL software as
an Open Source product under the terms of the GNU General Public License or can
purchase a standard commercial license from MySQL AB.
The company name was given after co-founder Monty Widenius's daughter, My, the SQL is
“Structured Query Language.”, AB is Sweedish for limited partnership.
• MySQL is a database management system.
A database is a structured collection of data. It may be anything from a simple shopping list to a
picture gallery or the vast amounts of information in a corporate network. To add, access, and
process data stored in a computer database, you need a database management system such as
MySQL Server. Since computers are very good at handling large amounts of data, database
18
management systems play a central role in computing, as standalone utilities, or as parts of other
applications.
• MySQL databases are relational.What is MySQL?
A relational database stores data in separate tables rather than putting all the data in one big
storeroom. The database structures are organized into physical files optimized for speed. The
logical model, with objects such as databases, tables, views, rows, and columns, offers a flexible
programming environment. You set up rules governing the relationships between different data
fields, such as one-to-one, one-to-many, unique, required or optional, and “pointers” between
different tables. The database enforces these rules, so that with a well-designed database, your
application never sees inconsistent, duplicate, orphan, out-of-date, or missing data. The SQL part
of “MySQL” stands for “Structured Query Language”. SQL is the most common standardized
language used to access databases. Depending on your programming environment, you might
enter SQL directly (for example, to generate reports), embed SQL statements into code written in
another language, or use a language-specific API that hides the SQL syntax. SQL is defined by
the ANSI/ISO SQL Standard. The SQL standard has been evolving since 1986 and several
versions exist. In this manual, “SQL-92” refers to the standard released in 1992, “SQL:1999”
refers to the standard released in 1999, and “SQL:2003” refers to the current version of the
standard. We use the phrase “the SQL standard” to mean the current version of the SQL
Standard at any time
MySQL Overview
What does it do?
 MySQL is a database management system.
A database is a structured collection of data. To add, access, and process data stored in a computer database, you need a database management system such as MySQL
Server.
 MySQL is a relational database management system.
A relational database stores data in separate tables rather than putting all the data in one big storeroom. This adds speed and flexibility. The SQL part of “MySQL”
stands for “Structured Query Language.”
 MySQL software is Open Source.
Open Source means that it is possible for anyone to use and modify the software. Anybody can download the MySQL software from the Internet and use it without
paying anything. If you wish, you may study the source code and change it to suit your needs. If you want to redistribute altered versions MySQL, other licences are
available
19
 MySQL Server works in client/server or embedded systems.
The MySQL Database Software is a client/server system that consists of a multi-threaded SQL server that supports different backends, several different client programs
and libraries, administrative tools, and a wide range of application programming interfaces (APIs).
 A large amount of contributed MySQL software is available.
MySQL is a widely supported database, and very likely that most of your applications supports it.
MySQL Architecture
Three layer model:
 The application layer contains common network services for connection handling,
authentication and security. This layer is where different clients interact with MySQL
these clients can written in different API's:.NET, Java, C, C++, PHP, Python, Ruby, Tcl,
Eiffel, etc...
 The Logical Layer is where the MySQL intelligence resides, it includes functionality for
query parsing, analysis, caching and all built-in functions (math, date...). This layer also
provides functionality common across the storage engines.
 The Physical Layer is responsible for storing and retrieving all data stored in “MySQL”.
Associated with this layer are the storage engines, which MySQL interacts with very
basic standard API's. Each storage engine has it strengths and weakness, some of this
engines are MyISAM, InnoDB, CSV, NDB Cluster, Falcon, etc...
Some internal components:
20
Each client connection gets its own thread within the server process.
When clients (applications) connect to the MySQL server, the server needs to authenticate them.
Before even parsing the query, though, the server consults the query cache, which only stores
SELECT statements, along with their result sets.
The storage engine does affect how the server optimizes query.
Storage engines:
MySQL supports several storage engines that act as handlers for different table types. MySQL
storage engines include both those that handle transaction-safe tables and those that handle non-
transaction-safe tables.
MySQL Files:
21
In Linux the configuration file is typically located at /etc/mysql/my.cnf, but may vary for the
different Linux flavours, this also applies to the database files them selves which are located in
the /var/lib/MySQL.
Regardless of the storage engine, every MySQL table you create is represented, on disk, by a
.frm file, which describes the table’s format (i.e. the table definition). The file bears the same
name as the table, with a .frm extension. The .frm format is the same on all platforms but in the
description of the .frm format that follows, the examples come from tables created under the
Linux operating system.
/var/lib/mysql/db.frm #Table definition
/var/lib/mysql/db.MYD #MyISAM data file
/var/lib/mysql/db.MYI #MyISAM Index file
/var/lib/mysql/ibdata1 #Innodb data file
MySQL Cluster Overview
MySQL Cluster is a technology that enables clustering of in-memory databases in a shared-
nothing system. The shared-nothing architecture enables the system to work with very
inexpensive hardware, and with a minimum of specific requirements for hardware or software.
MySQL Cluster is designed not to have any single point of failure. In a shared-nothing system,
each component is expected to have its own memory and disk, and the use of shared storage
mechanisms such as network shares, network file systems, and SANs is not recommended or
supported.
MySQL Cluster integrates the standard MySQL server with an in-memory clustered storage
engine called NDB (which stands for “Network DataBase”). In our documentation, the term
NDB refers to the part of the setup that is specific to the storage engine, whereas “MySQL
Cluster” refers to the combination of one or more MySQL servers with the NDB storage engine.
A MySQL Cluster consists of a set of computers, known as hosts, each running one or more
processes. These processes, known as nodes, may include MySQL servers (for access to NDB
data), data nodes (for storage of the data), one or more management servers, and possibly other
specialized data access programs. The relationship of these components in a MySQL Cluster is
shown here:
22
5.2 N-Tier Architecture
23
Figure 5.1.6 N-Tier Architecture
24
5.2.1 Java
The Java platform is the ideal platform for network computing. Running across all
platforms -- from servers to cell phones to smart cards -- Java technology unifies business
infrastructure to create a seamless, secure, networked platform for your business. The Java
platform benefits from a massive community of developers and supporters that actively work on
delivering Java technology-based products and services as well as evolving the platform through
an open, community-based, standards organization known as the Java Community Process
program. You can find Java technology in cell phones, on laptop computers, on the Web, and
even trackside at Formula One Grand Prix races. The fact is today, you can find Java technology
just about everywhere!
5.2.2 Business Benefits
• A richer user experience - Whether you're using a Java technology-enabled mobile phone
to play a game or to access your company's network, the Java platform provides the
foundation for true mobility. The unique blend of mobility and security in Java
technology makes it the ideal development and deployment vehicle for mobile and
wireless solutions.
• The ideal execution environment for Web services - The Java and XML languages are the
two most extensible and widely accepted computing languages on the planet, providing
maximum reach to everyone, everywhere, every time, to every device and platform.
• Enabling business from end to end - Java offers a single, unifying programming model
that can connect all elements of a business infrastructure.
25
5.2.3 Android
1.1 What is Android?
Android is an open source and Linux-based Operating System for mobile devices such as smart
phones and tablet computers. Android was developed by the Open Handset Alliance, led by
Google, and other companies. Android offers a unified approach to application development for
mobile devices which means developers need only develop for Android, and their applications
should be able to run on different devices powered by Android. The first beta version of the
Android Software Development Kit (SDK) was released by Google in 2007 where as the first
commercial version, Android 1.0, was released in September 2008. On June 27, 2012, at the
Google I/O conference, Google announced the next Android version, 4.1 Jelly Bean. Jelly Bean
is an incremental update, with the primary aim of improving the user interface, both in terms of
functionality and performance. The source code for Android is available under free and open
source software licenses. Google publishes most of the code under the Apache License version
2.0 and the rest, Linux kernel changes, under the GNU General Public
1.2 History of Android
The history and versions of android are interesting to know. The code names of android
ranges from A to J currently, such
as Aestro, Blender, Cupcake, Donut, Eclair, Froyo,Gingerbread, Honeycomb, Ice
Cream Sandwitch,Jelly Bean and KitKat. Let's understand the android history pointy:
• Initially, Andy Rubin founded Android Incorporation in Palo Alto, California,
United States in October, 2003.
• In 17th August 2005, Google acquired android Incorporation. Since then, it is in
the subsidiary of Google Incorporation.
• The key employees of Android Incorporation are Andy Rubin, Rich Miner, Chris
White and Nick Sears.
• Originally intended for camera but shifted to smart phones later because of low
market for camera only.
• Android is the nick name of Andy Rubin given by coworkers because of his love to
robots.
• In 2007, Google announces the development of android OS.
• In 2008, HTC launched the first android mobile.
26
1.3 Features of Android
Android is a powerful operating system competing with Apple 4GS and supports great features.
Few of them are listed below.
1.4 Feature Description
Feature Description
Beautiful UI Android OS basic screen provides a beautiful and intuitive user interface.
Connectivity GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC and
WiMAX.
Storage SQLite, a lightweight relational database, is used for data storage purposes.
Media
support
H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1, MP3,
MIDI, Ogg
Vorbis, WAV, JPEG, PNG, GIF, and BMP
Messaging SMS and MMS
Web
browser
Based on the open-source WebKit layout engine, coupled with Chrome's V8
JavaScript
Engine supporting HTML5 and CSS3.
Multi-touch Android has native support for multi-touch which was initially made available in
handsets
Such as the HTC Hero.
Multi-
tasking
User can jump from one task to another and same time various application can
run
Simultaneously.
Resizable
widgets
Widgets are resizable, so users can expand them to show more content or shrink
them to
27
save space
Multi-
Language
Supports single direction and bi-directional text.
GCM Google Cloud Messaging (GCM) is a service that lets developers send short
message data
to their users on Android devices, without needing a proprietary sync solution.
Wi-Fi Direct A technology that lets apps discover and pair directly, over a high-bandwidth
peer-to-peer
connection.
Android
Beam
A popular NFC-based technology that lets users instantly share, just by touching
two NFCenabled
phones together.
1.5 Android Applications
Android applications are usually developed in the Java language using the Android Software
Development Kit. Once developed, Android applications can be packaged easily and sold out
either through a store such as Google Play or the Amazon Appstore. Android powers hundreds of
millions of mobile devices in more than 190 countries around the world. It's the largest installed
base of any mobile platform and growing fast. Every day more than 1 million new Android
devices are activated worldwide. This tutorial has been written with an aim to teach you how to
develop and package Android application. We will start from environment setup for Android
application programming and then drill down to look into various aspects of Android
applications.
Android Versions, Codename and API
Let's see the android versions codename and API provided by Google.
Version Codename API
28
1.5 Cupcake 3
1.6 Donut 4
2.1 Eclair 7
2.2 Froyo 8
2.3 Gingerbread 9 and 10
3.1 and 3.3 Honeycomb 12 and 13
4.0 Ice Cream Sandwitch 15
4.1, 4.2 and 4.3 Jelly Bean 16, 17 and 18
4.4 KitKat 19
Next
1.6 Android Core Building Blocks
29
A component is simply a piece of code that has a well defined life cycle e.g. Activity, Receiver,
and Service etc. The core building blocks or fundamental components of android are
activities, views, intents, services, content providers, fragments and AndroidManifest.xml.
Activity
An activity is a class that represents a single screen. It is like a Frame in AWT.
View
A view is the UI element such as button, label, text field etc. Anything that you see is a view.
IntentIntent is used to invoke components. It is mainly used to:
• Start the service
• Launch an activity
• Display a web page
• Display a list of contacts
• Broadcast a message
• Dial a phone call etc.
Service
Service is a background process that can run for a long time.There are two types of services local
and remote. Local service is accessed from within the application whereas remote service is
accessed remotely from other applications running on the same device.
Content Provider
Content Providers are used to share data between the applications.
Fragment
Fragments are like parts of activity. An activity can display one or more fragments on the screen at the
same time.
AndroidManifest.xml
It contains informations about activities, content providers, permissions etc. It is like the
web.xml file in Java EE.
30
Android Virtual Device (AVD)
It is used to test the android application without the need for mobile or tablet etc. It can be
created in different configurations to emulate different types of real devices.
1.7 Android Emulator
Android Emulator is used to run, debug and test the android application. If you don't have the
real device, it can be the best way to run, debug and test the application.It uses an open source
processor emulator technology called QEMU.The emulator tool enables you to start the
emulator from the command line. You need to write:
emulator -avd <AVD NAME>
In case of Eclipse IDE, you can create AVD by Window menu > AVD Manager > New.In the
given image, you can see the android emulator, it displays the output of the hello android
example.
31
1.8 Installing software for Android
Android supports java, c++, c# etc. language to develop android applications. Java is the
officially supported language for android. All the android examples of this site is developed
using Java language and Eclipse IDE. Here, we are going to tell you, the required softwares to
develop android applications using Eclipse IDE.
Simple way by ADT Bundle
It is the simplest technique to install required softwares for android application. It includes:
• Eclipse IDE
• Android SDK
• Eclipse Plugin
If you download the ADT from android site, you don't need to have eclipse IDE, android SDK
and eclipse Plugin because it is already included in adt bundle.
If you have downloaded the ADT bundle, unjar it, go to eclipse IDE and start the eclipse by
clicking on the eclipse icon. You don't need to do any extra steps here.
1.9 How to setup Android for Eclipse IDE
In this page, you will learn what softwares are required for running an android application on
eclipse IDE. Here, you will be able to learn how to install the android SDK ADT plugin for
Eclipse IDE. Let's see the softwares required to setup android for eclipse IDE manually.
1. Install the JDK
2. Download and install the Eclipse for developing android application
3. Download and Install the android SDK
4. Intall the ADT plugin for eclipse
5. Configure the ADT plugin
6. Create the AVD
7. Create the hello android application
1) Install the Java Development Kit (JDK)
For creating android application, JDK must be installed if you are developing the android
application with Java language. download the JDK
32
2) Download and install the Eclipse IDE for developing the android application
For developing the android application using eclipse IDE, you need to install the Eclipse. you
can download it from this location download the Eclipse. Eclispe classic version is
recommended but we are using the Eclipse IDE for JavaEE Developers (Eclipse Helios).
3) Download and install the android SDK
First of all, download the android SDK. In this example we have installed the android SDK for
windows (.exe version). Now double click on the exe file, it will be installed. I am using the
android 2.2 version here.
4) Download the ADT plugin for eclipse
ADT (Android Development Tools) is required for developing the android application in the
eclipse IDE. It is the plugin for Eclipse IDE that is designed to provide the integrated
environment.
For downloading the ADT, you need to follow these steps:
1. Start the eclipse IDE, then select Help > Install new software...
2. In the work with combo box, write https://dl-ssl.google.com/android/eclipse/
33
3. select the checkbox next to Developer Tools and click next
4. you will see, a list of tools to be downloaded here, click next
5. click finish
6. After completing the installation, restart the eclipse IDE
5) Configuring the ADT plugin
After the installing ADT plugin, now tell the eclipse IDE for your android SDK location. For
this:
1. Select the Window menu > preferences
2. Now select the android from the left panel. Here you may see a dialog box asking if
you want to send the statistics to the google. Click proceed.
3. Click on the browse button and locate your SDK directory e.g. my SDK location is
C:Program FilesAndroidandroid-sdk .
4. Click the apply button then OK.
34
6) Create an Android Virtual Device (AVD)
For running the android application in the Android Emulator, you need to create and AVD.
For creating the AVD:
1. Select the Window menu > AVD Manager
2. Click on the new button, to create the AVD
3. Now a dialog appears, write the AVD name e.g. myavd. Now choose the target android
version e.g. android2.2.
4. click the create AVD
1.10 ARCHITECTURE
Android operating system is a stack of software components which is roughly divided into five
sections and
four main layers as shown below in the architecture diagram.
Linux kernel
At the bottom of the layers is Linux - Linux 2.6 with approximately 115 patches. This provides
basic system functionality like process management, memory management, device management
like camera, keypad, display etc. Also, the kernel handles all the things that Linux is really good
35
at such as networking and a vast array of device drivers, which take the pain out of interfacing to
peripheral hardware.
Libraries
On top of Linux kernel there is a set of libraries including open-source Web browser engine
WebKit, well known library libc, SQLite database which is a useful repository for storage and
sharing of application data, libraries to play and record audio and video, SSL libraries
responsible for Internet security etc.
Android Runtime
This is the third section of the architecture and available on the second layer from the bottom.
This section provides a key component called Dalvik Virtual Machine which is a kind of Java
Virtual Machine specially designed and optimized for Android. The Dalvik VM makes use of
Linux core features like memory management and multi-threading, which is intrinsic in the Java
language. The Dalvik VM enables every Android application to run in its own process, with its
own instance of the Dalvik virtual machine. The Android runtime also provides a set of core
libraries which enable Android application developers to write Android applications using
standard Java programming language.
Application Framework
The Application Framework layer provides many higher-level services to applications in the
form of Java classes. Application developers are allowed to make use of these services in their
applications.
Applications
You will find all the Android application at the top layer. You will write your application to be
installed on this layeronly. Examples of such applications are Contacts Books, Browser, Games
etc.
1.11Application Components
Application components are the essential building blocks of an Android application. These
components are loosely coupled by the application manifest file AndroidManifest.xml that
36
describes each component of the application and how they interact.There are following four main
components that can be used within an Android application:
Activities: They they dictate the UI and handle the user interaction to the smartphone screen
Services They handle background processing associated with an application.
Broadcast Receivers They handle communication between Android OS and applications.
Content Providers They handle data and database management issues.
Activities
An activity represents a single screen with a user interface. For example, an email application
might have one activity that shows a list of new emails, another activity to compose an email,
and another activity for reading emails. If an application has more than one activity, then one of
them should be marked as the activity that is presented when the application is launched.
An activity is implemented as a subclass of Activity class as follows:
public class MainActivity extends Activity {
}
Services
A service is a component that runs in the background to perform long-running operations. For
example, a service might play music in the background while the user is in a different
application, or it might fetch data over the network without blocking user interaction with an
activity.A service is implemented as a subclass of Service class as follows:
public class MyService extends Service {
Simply Easy Learning
}
Broadcast Receivers
Broadcast Receivers simply respond to broadcast messages from other applications or from the
system. Forexample, applications can also initiate broadcasts to let other applications know that
some data has beendownloaded to the device and is available for them to use, so this is broadcast
37
receiver who will intercept thiscommunication and will initiate appropriate action.A broadcast
receiver is implemented as a subclass of BroadcastReceiver class and each message is
broadcasted as an Intent object.
public class MyReceiver extends BroadcastReceiver {
}
Content Providers
A content provider component supplies data from one application to others on request. Such
requests are handled by the methods of the ContentResolver class. The data may be stored in the
file system, the database or somewhere else entirely. A content provider is implemented as a
subclass of ContentProvider class and must implement a standard set of APIs that enable other
applications to perform transactions.
public class MyContentProvider extends ContentProvider {
}
Additional Components
There are additional components which will be used in the construction of above mentioned
entities, their logic,and wiring between them. These components are:
Components Description
Fragments Represents a behavior or a portion of user interface in an Activity.
Views UI elements that are drawn onscreen including buttons, lists forms etc.
Layouts View hierarchies that control screen format and appearance of the views.
Intents Messages wiring components together.
Resources External elements, such as strings, constants and drawables pictures.
Manifest Configuration file for the application.
1.12Android Life Cycle of Activity
We can control and manage the resource through the life cycle methods of activity. There are 7
life cycle methods of android.app.Activity class. They are as follows:
38
Method Description
onCreate called when activity is first created.
onStart called when activity is becoming visible to the user.
onResume called when activity will start interacting with the user.
onPause called when activity is not visible to the user.
onStop called when activity is no longer visible to the user.
onRestart called after your activity is stopped, prior to start.
onDestroy called before the activity is destroyed.
39
40
1.13 Dalvik Virtual Machine
As we know the modern JVM is high performance and provides excellent memory management.
But it need to be optimized for low-powered handheld devices. The Dalvik Virtual Machine
(DVM) is optimized for mobile devices. It optimizes the JVM formemory, battery
life and performance.Dalvik is a name of a town in Iceland. The Dalvik VM was written by Dan
Bornstein.The Dex compiler converts the class files into the .dex files that run on the Dalvik
VM.Let's see the compiling and packaging process from the source file:
The javac tool compiles the java source file into the class file. The dx tool takes all the class
files of your application and generates a single .dex file. It is a platform-specific tool.
The Android Assets Packaging Tool (aapt) handles the packaging process.
CHAPTER - VI
SYSTEM IMPLEMENTATION
41
6.1 Client Side Coding
6.2 Server Side Coding
}
CHAPTER - VII
TESTING
SYSTEM TESTING AND MAINTENANCE
TESTING:
Testing is a set of activities that can be planned in advance and
conducted systematically. For this reason a template for software testing, a set of
steps into which we can place specific test case design techniques and testing
methods should be defined for software process.
Testing often accounts for more effort than any other software
engineering activity. If it is conducted haphazardly, time is wasted, unnecessary
effort is expanded, and even worse, errors sneak through undetected. It would
therefore seem reasonable to establish a systematic strategy for testing software
42
TYPE OF TESTING
There are two type of testing according their behaviors
I. Unconventional Testing
II. Conventional Testing
UNCONVENTIONAL TESTING
Unconventional testing is a process of verification which is
doing by SQA (Software Quality Assurance) team. It is a prevention technique
which is performing from beginning to ending of the project development. In this
process SQA team verifying the project development activities and insuring that
the developing project is fulfilling the requirement of the client or not.
In this testing the SQA team follows these methods:
1. Peer review
2. Code walk and throw
3. Inspection
4. Document Verification
CONVENTIONAL TESTING
43
Conventional Testing is a process of finding the bugs and validating
the project. Testing team involves in this testing process and validating that
developed project is according to client requirement or not. This process is a
correction technique where testing team find bugs and reporting to the
development team for correction on developed project built.
UNIT TESTING:
The procedure level testing is made first. By giving improper inputs,
the errors occurred are noted and eliminated. Then the web form level testing is
made. For example storage of data to the table in the correct manner.
In the company as well as seeker registration form, the zero length
username and password are given and checked. Also the duplicate username is
given and checked. In the job and question entry, the button will send data to the
server only if the client side validations are made.
The dates are entered in wrong manner and checked. Wrong email-id
and web site URL (Universal Resource Locator) is given and checked.
44
INTEGRATION TESTING:
Testing is done for each module. After testing all the modules, the
modules are integrated and testing of the final system is done with the test data,
specially designed to show that the system will operate successfully in all its
aspects conditions. Thus the system testing is a confirmation that all is correct and
an opportunity to show the user that the system works.
MODULE TESTING:
Module Testing is a process of testing the system, module by module.
It includes the various inputs given, outputs produced and their correctness. By
testing in this method we would be very clear of all the bugs that have occurred.
INTERFACE TESTING:
45
The Interface Testing is performed to verify the interfaces between
sub modules while performing integration of sub modules aiding master module
recursively.
VALIDATION TESTING:
The final step involves Validation testing, which determines whether
the software function as the user expected. The end-user rather than the system
developer conduct this test most software developers as a process called “Alpha
and Beta were testing” to uncover that only the end user seems able to find.
The compilation of the entire project is based on the full
satisfaction of the end users. In the project, validation testing is made in various
forms.
MAINTENANCE:
The objectives of this maintenance work are to make sure that
the system gets into work all time without any bug. Provision must be for
environmental changes which may affect the computer or software system. This is
called the maintenance of the system. Nowadays there is the rapid change in the
software world. Due to this rapid change, the system should be capable of adapting
46
these changes. In our project the process can be added without affecting other parts
of the system.
Maintenance plays a vital role. The system liable to accept
any modification after its implementation. This system has been designed to favour
all new changes. Doing this will not affect the system’s performance or its
accuracy.
TESTING STRATEGIES
• A number of software testing strategies have been proposed in the
literature. All provide the software developer with a template for testing and
all have the following generic characteristics:
•
• Testing begins at the component level and works “outward” toward
the integration of the entire computer-based system.
• Different testing techniques are appropriate at different points in
time.
47
• The developer of the software conducts testing and for large projects,
independent test group.
• Testing and debugging are different activitccommodated in any
testing strategy.
CHAPTER - VIII
PERFORMANCE AND LIMITATION
8.1 Conclusion
We are Developing an Android based User Interface for Fetching the
Nearest available Bus, its Time to reach the Source and the Distance which will
surely avoid the waiting time for Android User.
8.1.1 Merits of the System
1. Blind People can read their incoming through voice output. And also they can identify
the phone number.
2. They can identify the incoming phone number through voice output.
48
3. Identify the current location when they travel to different place through voice output of
every two minutes.
4. The blind people can also access the smart phone through my application.
8.1.2 Limitations of the System
1. Missed call cannot able to define by blind people.
2. Unread SMS cannot able to define and read.
3. Satellite breakage happen means they cannot able to find the location.
8.2 Future Enhancements
49
APPENDICES
9.1 Sample Screens
REFERENCES
Book References
[15] M. Haridasan, I. Mohomed, D. Terry, C. A. Thekkath, and L. Zhang,
“Startrack next generation: A scalable infrastructure for track-based applications,”
in Proc. USENIX OSDI, 2010.
[16] M. Keally, G. Zhou, G. Xing, J. Wu, and A. Pyles, “PBN: Towards practical
activity recognition using smartphone-based body sensor networks,” in Proc. ACM
SenSys, Seattle, WA, USA, 2011, pp. 246–259.
[17] F. Li, Y. Yu, H. Lin, and W. Min, “Public bus arrival time prediction based on
traffic information management system,” in Proc. IEEE SOLI, Beijing, China,
2011, pp. 336–341.
50
[18] Y. Liu, L. Chen, J. Pei, Q. Chen, and Y. Zhao, “Mining frequent trajectory
patterns for activity monitoring using radio frequency tag arrays,” in Proc. IEEE
PerCom, White Plains, NY, USA, 2007.
[19] H. Lu, W. Pan, N. D. Lane, T. Choudhury, and A. T. Campbell, “SoundSense:
Scalable sound sensing for people-centric applications on mobile phones,” in Proc.
ACM MobiSys, Kraków, Poland, 2009, pp. 165–178.
[20] J. Paek, J. Kim, and R. Govindan, “Energy-efficient rate-adaptive GPS-based
positioning for smartphones,” in Proc. ACM MobiSys, San Francisco, CA, USA,
2010, pp. 299–314.
[21] J. Paek, K.-H. Kim, J. P. Singh, and R. Govindan, “Energy-efficient
positioning for smartphones using cell-ID sequence matching,” in Proc. ACM
MobiSys, Bethesda, MD, USA, 2011, pp. 293–306.
[22] C. Peng, G. Shen, Y. Zhang, Y. Li, and K. Tan, “BeepBeep: A high accuracy
acoustic ranging system using COTS mobile devices,” in Proc. ACM SenSys,
Sydney, NSW, Australia, 2007, pp. 1–14.
[23] S. Reddy et al., “Using mobile phones to determine transportation modes,”
ACM Trans. Sensor Netw., vol. 6, no. 2, pp. 1–27, Mar. 2010.
[24] A. Thiagarajan, J. Biagioni, T. Gerlich, and J. Eriksson,
“Cooperative transit tracking using smart-phones,” in Proc. ACM SenSys, Zurich,
Switzerland, 2010, pp. 85–98.
[25] A. Thiagarajan, L. Ravindranath, H. Balakrishnan, S. Madden, and L. Girod,
“Accurate, low-energy trajectory mapping for mobile devices,” in Proc. USENIX
NSDI, Berkeley, CA, USA, 2011.
Web References
[1] www.android developer.com
[2] www.analog.com/DSP-Software-Kit
[3] http://developer.android.com/sdk/
[4] www.w3school.com
[5] http://developer.samsung.com/android/technical-docs/Gestures-in-Android
51
52

More Related Content

DOC
Vehicle Tracking System Android Project Report
PDF
Mobile GPS Tracking
PDF
Bus tracking application project report
DOCX
Vehicle tracking system
PDF
IRJET - Real Time Tracking System and Generate QR Code based Ticket for Publ...
PDF
Intelligent Bus Tracking System Using Android
DOCX
Final_report
PDF
BLIND AID : TRAVEL AID FOR BLIND
Vehicle Tracking System Android Project Report
Mobile GPS Tracking
Bus tracking application project report
Vehicle tracking system
IRJET - Real Time Tracking System and Generate QR Code based Ticket for Publ...
Intelligent Bus Tracking System Using Android
Final_report
BLIND AID : TRAVEL AID FOR BLIND

What's hot (17)

PPTX
How Long to Wait? Predicting Bus Arrival Time With Mobile Phone Based Partici...
PPT
How long to wait predicting bus arrival time with mobile phone based particip...
PPTX
Predicting bus arrival time based on participatory mobile phone sensing
PDF
Vehicle tracking system using gps and gsm techniques
PDF
GPRS Based Bus Monitoring System
PDF
GPS Tracking System for Public Transport
PDF
Location Based Services, Change in Profile and Notification
PDF
A survey on real time bus monitoring system
DOCX
Location sharing and automatic message sender Android Application
PDF
IRJET- Smart Bus Tracking System
PDF
Final report
PDF
IoT BASED VEHICLE TRACKING AND TRAFFIC SURVIELLENCE SYSTEM
PDF
Db35575578
DOCX
project report. final
PDF
Real-Time Bus Tracking System
PDF
Advanced Vehicle Tracking system using GSM/GPRS and GPS
PDF
Novel based Approach Schema for Processing Vehicle Tracking System through GP...
How Long to Wait? Predicting Bus Arrival Time With Mobile Phone Based Partici...
How long to wait predicting bus arrival time with mobile phone based particip...
Predicting bus arrival time based on participatory mobile phone sensing
Vehicle tracking system using gps and gsm techniques
GPRS Based Bus Monitoring System
GPS Tracking System for Public Transport
Location Based Services, Change in Profile and Notification
A survey on real time bus monitoring system
Location sharing and automatic message sender Android Application
IRJET- Smart Bus Tracking System
Final report
IoT BASED VEHICLE TRACKING AND TRAFFIC SURVIELLENCE SYSTEM
Db35575578
project report. final
Real-Time Bus Tracking System
Advanced Vehicle Tracking system using GSM/GPRS and GPS
Novel based Approach Schema for Processing Vehicle Tracking System through GP...
Ad

Viewers also liked (8)

DOC
Prapullla tech lead testing with 9 years exp
PPTX
Twitch Presentation
PDF
Past, present, and future of Recommender Systems: an industry perspective
PDF
Experimentation Platform at Netflix
PDF
Digital Leadership Lab: Going Viral! Developing an Online Brand for Leadershi...
PDF
College Student Educators: What Grad School Didn't Teach You About Your Digit...
PDF
Like This Keynote! Social-Digital Student Satisfaction and Engagement
PDF
The Digital Development of College Students
Prapullla tech lead testing with 9 years exp
Twitch Presentation
Past, present, and future of Recommender Systems: an industry perspective
Experimentation Platform at Netflix
Digital Leadership Lab: Going Viral! Developing an Online Brand for Leadershi...
College Student Educators: What Grad School Didn't Teach You About Your Digit...
Like This Keynote! Social-Digital Student Satisfaction and Engagement
The Digital Development of College Students
Ad

Similar to WHY TO WAIT (20)

PDF
IRJET- Public Bus Transport Location Monitoring System
PDF
IRJET-V7I61054.pdf
PPTX
Bus tracking application in Android
PPTX
Bus Locator
PDF
IRJET- College Bus Tracking and Notification System
PDF
BLIND AID : TRAVEL AID FOR BLIND
PDF
BLIND AID : TRAVEL AID FOR BLIND
PDF
BLIND AID : TRAVEL AID FOR BLIND
PDF
BLIND AID : TRAVEL AID FOR BLIND
PDF
Blind Aid : Travel Aid for Blind - IJCAx
PDF
BLIND AID : TRAVEL AID FOR BLIND
PPT
Bus Tracking Application in Android
PDF
Gps enabled android application for bus
PDF
Gps enabled android application for bus
PDF
IRJET- Bus Monitoring System using Android Application
PDF
Traffic detection system using android
PDF
Traffic detection system using android
PDF
11.design and implementation of vehicle tracking system using gps
PDF
Design and implementation of vehicle tracking system using gps
PDF
Design and Implementation for Trucks Tracking System Using GPS Based on Seman...
IRJET- Public Bus Transport Location Monitoring System
IRJET-V7I61054.pdf
Bus tracking application in Android
Bus Locator
IRJET- College Bus Tracking and Notification System
BLIND AID : TRAVEL AID FOR BLIND
BLIND AID : TRAVEL AID FOR BLIND
BLIND AID : TRAVEL AID FOR BLIND
BLIND AID : TRAVEL AID FOR BLIND
Blind Aid : Travel Aid for Blind - IJCAx
BLIND AID : TRAVEL AID FOR BLIND
Bus Tracking Application in Android
Gps enabled android application for bus
Gps enabled android application for bus
IRJET- Bus Monitoring System using Android Application
Traffic detection system using android
Traffic detection system using android
11.design and implementation of vehicle tracking system using gps
Design and implementation of vehicle tracking system using gps
Design and Implementation for Trucks Tracking System Using GPS Based on Seman...

WHY TO WAIT

  • 1. CHAPTER - I INTRODUCTION 1.1 Organization Profile 1.2 Abstract In the EXISTING SYSTEM, there is no tracking of Buses happening. GPS based Vehicle is only the solution but still arrival Timing of the Buses are not intimated to the bus stop. In the PROPOSED MODEL, GPS Hardware installed in the Bus Passengers Mobile Phone or in the Drivers Mobile Phone is used for Tracking of the Buses. This GPS will Transmit it’s Longitude and Latitude Location Values to the Centralized Server via GPRS. Android Application is Created for the User’s Querying System for Tracking the Corresponding Buses. User will be giving Starting and Destination Place via Android Phone to the Server. In the MODIFICATION Part, We implement any one of the following Concepts. First one is using GPS based implementation, second one using Zigbee . One Zigbee is attached with the bus and another Zigbee is attached with the Vehicle. Once the vehicle crosses the Bus Stop corresponding IR Value is Transmitted to Server through Zigbee Communication. In the Third Implementation, We implement the same process using prototype manner with Graphical Path Virtualisation. Once the Bus starts from the Bus Depot it intimates to the nearest Bus Stop as it is approaching, Buses will be moving in a Map where it’s Position will be Transmitted to the Server as and then. In All the Three implementation, Android Part will be same. Android Mobile user can send the request of his / her Source and Destination of the Route so that the Server will identify the Nearest bus and the Time taken for the us bus to reach the requested stop. So that the Mobile user can plan his / her Travel according to the timing of the arrival of Bus. 1
  • 2. 1.3 Problem Definition CHAPTER - II SYSTEM ANALYSIS 2.1 Existing System there is no tracking of Buses happening. GPS based Vehicle is only the solution but still arrival Timing of the Buses are not intimated to the bus stop. 2.2 Proposed System 2
  • 3. GPS Hardware installed in the Bus Passengers Mobile Phone or in the Drivers Mobile Phone is used for Tracking of the Buses. This GPS will Transmit it’s Longitude and Latitude Location Values to the Centralized Server via GPRS. Android Application is Created for the User’s Querying System for Tracking the Corresponding Buses. User will be giving Starting and Destination Place via Android Phone to the Server. IMPLEMENTATION PART : METHOD : 1 First one is using GPS based implementation. Android Phone’s GPS Hardware is used for tracking the Vehicle. We will be having two Android Phones. One is for Tracking the Vehicle using GPS installed in the Android. Another is used for the User Request. There will be Three parts in this Implementation. Vehicle part is to communicate with the Server for continuous Tracking. Server part is to fetch all the Vehicles Current Positions and update them one by one as well as to handle and Responding the User’s Bus Query via Android Phone. Android Mobile user can send the request of his / her Source and Destination of the Route so that the Server will identify the Nearest bus and the Time taken for the us bus to reach the requested stop. So that the Mobile user can plan his / her Travel according to the timing of the arrival of Bus. METHOD : 2 The second part is using Zigbee . One Zigbee is attached with the bus and another Zigbee is attached with the Vehicle. Once the vehicle crosses the Bus Stop corresponding IR Value is Transmitted to Server through Zigbee Communication.We build the Prototype car Implementation. This vehicle will be mobilizing in any Route and IR Trasnmitters are installed all along the Bus Stops of that Route. Once the Vehicle reached the Bus Stop, IR Transmitter installed in that Bus Stop will Transmit a Signal to the IR Receiver installed in the Vehicle. Vehicle will be moving in route where IR Transmitters are installed. This Vehicle communicates with the Every IR Transmitters installed in the Bus Stop. Corresponding Bus Stop ID is transmitted to the Server. Android Mobile user can send the request of his / her Source and Destination of the Route so that the Server will identify the Nearest bus and the Time taken for the us bus to reach the 3
  • 4. requested stop. So that the Mobile user can plan his / her Travel according to the timing of the arrival of Bus. Once User sends the request to the Server about the Destination, Server will update with Nearest Bus, Arrival Time and Distance between User and the Vehicle to the Android User. User can Plan the Travel accordingly. METHOD : 3 In the Third Implementation, We implement the same process using prototype manner with Graphical Path Virtualisation. Once the Bus starts from the Bus Depot it intimates to the nearest Bus Stop as it is approaching, Buses will be moving in a Map where it’s Position will be Transmitted to the Server as and then. Android Mobile user can send the request of his / her Source and Destination of the Route so that the Server will identify the Nearest bus and the Time taken for the us bus to reach the requested stop. So that the Mobile user can plan his / her Travel according to the timing of the arrival of Bus. Once User sends the request to the Server about the Destination, Server will update with Nearest Bus, Arrival Time and Distance between User and the Vehicle to the Android User. User can Plan the Travel accordingly. 2.3 User Interface Requirements SOFTWARE REQUIREMENTS: 4
  • 5. • Platform :Windows XP • Front End : Java JDK1.5. • Back End :MY SQL • IDE :Eclipse • ANDROID OS HARDWARE REQUIREMENTS: Processor : Intel Core 2 Duo processor (2.2 GHz) Hard disk : 500 GB RAM : 2 GB DDR Android Phones : 2 Numbers 2.3.1 Modules 1. Android User 2. Bus Monitoring Server 3. Embedded Hardware Construction 4. Zigbee Communication Setup 5. Android Bus Query System 6. Nearest Bus Detection System Android User Mobile Client is an Android application which created and installed in the User’s Android Mobile Phone. So that we can perform the activities. The Application First 5
  • 6. Page Consist of the User registration Process. We’ll create the User Login Page by Button and Text Field Class in the Android. While creating the Android Application, we have to design the page by dragging the tools like Button, Text field, and Radio Button. Once we designed the page we have to write the codes for each. Once we create the full mobile application, it will generated as Android Platform Kit (APK) file. This APK file will be installed in the User’s Mobile Phone an Application. Bus Monitoring Server The Server will monitor the entire bus route’s information in their database and verify them if required. Also the Server will store the entire bus route’s information in their database. Also the Server has to establish the connection to communicate with the Android Users. The Server will update the each route’s activities in its database. Embedded Hardware Construction In this module we are going to interfaced the Embedded Kit, by which NFC values can be observed. And NFC is communication via zigbee network is interfaced with the Microcontroller. So that the device can obtain the values Zigbee Communication Setup 6
  • 7. The ZigBee Alliance is an association of companies working together to define an open global standard for making low-power wireless networks. The intended outcome of ZigBee Alliance is to create a specification defining how to build different network topologies with data security features and interoperable application profiles. in this every bus equipped with the Zigbee device so it create communication with every bus stop terminal Android Bus Query System In the daily operation of a bus system, the movement of vehicles is affected by uncertain conditions as the day progresses, such as traffic congestion, unexpected delays, and randomness in passenger demand, irregular vehicle dispatching times, and incidents. In a real-time setting, researchers have devoted significant effort to developing flexible control strategies using android so that user can make query about the bus details through the android phone to the get the details for the destination route, depending on the specific features of public transport systems Nearest Bus Detection System A Real-Time Passenger Information System uses a variety of technologies to track the locations of buses in real time and uses this information to generate predictions of bus arrivals at stops along the route When this information is disseminated to passengers by wired or wireless media, they can spend their time efficiently and reach the bus stop just before the bus arrives, or take alternate 7
  • 8. means of transport if the bus is delayed. They can even plan their journeys long before they actually undertake them. This will make the public transport system competitive and passenger- friendly 2.4 Feasibility Study The feasibility of the project is analyzed in this phase and business proposal is put forth with a very general plan for the project and some cost estimates. During system analysis the feasibility study of the proposed system is to be carried out. This is to ensure that the proposed system is not a burden to the company. For feasibility analysis, some understanding of the major requirements for the system is essential. 2.4.1 Economical Feasibility This study is carried out to check the economic impact that the system will have on the organization. The amount of fund that the company can pour into the research and development of the system is limited. The expenditures must be justified. Thus the developed system as well within the budget and this was achieved because most of the technologies used are freely available. Only the customized products had to be purchased. 2.4.2 Technical Feasibility This study is carried out to check the technical feasibility, that is, the technical requirements of the system. Any system developed must not have a high demand on the available technical resources. This will lead to high demands on the available technical resources. This 8
  • 9. will lead to high demands being placed on the client. The developed system must have a modest requirement, as only minimal or null changes are required for implementing this system. 2.4.3 Social Feasibility The aspect of study is to check the level of acceptance of the system by the user. This includes the process of training the user to use the system efficiently. The user must not feel threatened by the system, instead must accept it as a necessity. CHAPTER - III DEVELOPMENT ENVIRONMENT 3.1 Hardware Environment The hardware requirements may serve as the basis for a contract for the implementation of the system and should therefore be a complete and consistent specification of the whole system. They are used by software engineers as the starting point for the system design. It shows what the systems do and not how it should be implemented. • Hard disk : 120 GB • Monitor : 15’ color with vgi card support • Ram : Minimum 256 MB • Processor : Pentium iv and above (or) equivalent • Processor speed : Minimum 500 MHZ • Phone : Android 3.2 Software Environment 9
  • 10. The software requirements are the specification of the system. It should include both a definition and a specification of requirements. It is a set of what the system should do rather than how it should do it. The software requirements provide a basis for creating the software requirements specification. It is useful in estimating cost, planning team activities, performing tasks and tracking the team’s and tracking the team’s progress throughout the development activity. • Operating system : Windows XP • Languages : Java • Mobile Technology : Android • IDE : Eclipse • Develop tool : SDK CHAPTER - IV SYSTEM DESIGN 4.1.2 UML Diagram UML is simply anther graphical representation of a common semantic model. UML provides a comprehensive notation for the full lifecycle of object-oriented development. ADVANTAGES 10
  • 11. • To represent complete systems (instead of only the software portion) using object oriented concepts • To establish an explicit coupling between concepts and executable code • To take into account the scaling factors that are inherent to complex and critical systems • To creating a modeling language usable by both humans and machines UML defines several models for representing systems • The class model captures the static structure • The state model expresses the dynamic behavior of objects • The use case model describes the requirements of the user • The interaction model represents the scenarios and messages flows • The implementation model shows the work units 4.1.2.1 Use Case Diagram Use case diagrams overview the usage requirement for system. they are useful for presentations to management and/or project stakeholders, but for actual development you will find that use cases provide significantly more value because they describe “the meant” of the actual requirements. A use case describes a sequence of action that provide something of measurable value to an action and is drawn as a horizontal ellipse 11
  • 12. User Embedded Hardware Construction Zigbee Communication Setup Android Bus Query System Nearest Bus Detection System Server Figure 4.1.2.1 Use Case Diagram 4.1.2.2 Class Diagram 12
  • 13. Android User String Username String password String ip submit() Server String ip String location connect() BusTracking String busid String location track() Figure 4.1.2.2 Class Diagram 4.1.2.3 Sequence Diagram Sequence diagram model the flow of logic within your system in a visual manner, enabling you both to document and validate your logic, and commonly used for both analysis and design purpose. Sequence diagram are the most popular UML artifact for dynamic modeling, which focuses on identifying the behavior within your system. 13
  • 14. UserUser Embedded Hardware Construction Embedded Hardware Construction Android Bus Query System Android Bus Query System Nearest Bus Detection System Nearest Bus Detection System ServerServer 1: 2: 3: 4: Figure 4.1.2.3 Sequence Diagram 4.1.2.4 Collaboration Diagram Another type of interaction diagram is the collaboration diagram. A collaboration diagram represents a collaboration, which is a set of objects related in a particular context, and interaction, which is a set of messages exchange among the objects within the collaboration to achieve a desired outcome. 14
  • 15. User Embedded Hardware Construction Android Bus Query System Nearest Bus Detection System Server 1: 2: 3: 4: Figure 4.1.2.4 Collaboration Diagram 4.1.2.5 Activity Diagram Activity diagram are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency. The activity diagrams can be used to describe the business and operational step-by-step workflows of components in a system. Activity diagram consist of Initial node, activity final node and activities in between. 15
  • 16. User Embedded hardware Construction Zigbee Communication Setup Android Bus Query System Nearest Bus Detection System Result Figure 4.1.2.5 Activity Diagram 16
  • 17. 4.1.3 Data Flow Diagram 17 Mobile User BUS Request Centralized Server
  • 18. CHAPTER - V ARCHITECTURAL DETAILS Overview of the MySQL Database Management System What is MySQL? MySQL, the most popular Open Source SQL database management system, is developed, distributed, and supported by Oracle Corporation. The MySQL Web site (http://www.mysql.com/) provides the latest information about MySQL software.  MySQL, the most popular Open Source SQL database management system, is developed, distributed, and supported by MySQL AB. MySQL AB is a commercial company, founded in 1995 by the MySQL developers. It is a second generation Open Source company that unites Open Source values and methodology with a successful business model.  The MySQL® software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission- critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a registered trademark of MySQL AB.  The MySQL software is Dual Licensed. Users can choose to use the MySQL software as an Open Source product under the terms of the GNU General Public License or can purchase a standard commercial license from MySQL AB. The company name was given after co-founder Monty Widenius's daughter, My, the SQL is “Structured Query Language.”, AB is Sweedish for limited partnership. • MySQL is a database management system. A database is a structured collection of data. It may be anything from a simple shopping list to a picture gallery or the vast amounts of information in a corporate network. To add, access, and process data stored in a computer database, you need a database management system such as MySQL Server. Since computers are very good at handling large amounts of data, database 18
  • 19. management systems play a central role in computing, as standalone utilities, or as parts of other applications. • MySQL databases are relational.What is MySQL? A relational database stores data in separate tables rather than putting all the data in one big storeroom. The database structures are organized into physical files optimized for speed. The logical model, with objects such as databases, tables, views, rows, and columns, offers a flexible programming environment. You set up rules governing the relationships between different data fields, such as one-to-one, one-to-many, unique, required or optional, and “pointers” between different tables. The database enforces these rules, so that with a well-designed database, your application never sees inconsistent, duplicate, orphan, out-of-date, or missing data. The SQL part of “MySQL” stands for “Structured Query Language”. SQL is the most common standardized language used to access databases. Depending on your programming environment, you might enter SQL directly (for example, to generate reports), embed SQL statements into code written in another language, or use a language-specific API that hides the SQL syntax. SQL is defined by the ANSI/ISO SQL Standard. The SQL standard has been evolving since 1986 and several versions exist. In this manual, “SQL-92” refers to the standard released in 1992, “SQL:1999” refers to the standard released in 1999, and “SQL:2003” refers to the current version of the standard. We use the phrase “the SQL standard” to mean the current version of the SQL Standard at any time MySQL Overview What does it do?  MySQL is a database management system. A database is a structured collection of data. To add, access, and process data stored in a computer database, you need a database management system such as MySQL Server.  MySQL is a relational database management system. A relational database stores data in separate tables rather than putting all the data in one big storeroom. This adds speed and flexibility. The SQL part of “MySQL” stands for “Structured Query Language.”  MySQL software is Open Source. Open Source means that it is possible for anyone to use and modify the software. Anybody can download the MySQL software from the Internet and use it without paying anything. If you wish, you may study the source code and change it to suit your needs. If you want to redistribute altered versions MySQL, other licences are available 19
  • 20.  MySQL Server works in client/server or embedded systems. The MySQL Database Software is a client/server system that consists of a multi-threaded SQL server that supports different backends, several different client programs and libraries, administrative tools, and a wide range of application programming interfaces (APIs).  A large amount of contributed MySQL software is available. MySQL is a widely supported database, and very likely that most of your applications supports it. MySQL Architecture Three layer model:  The application layer contains common network services for connection handling, authentication and security. This layer is where different clients interact with MySQL these clients can written in different API's:.NET, Java, C, C++, PHP, Python, Ruby, Tcl, Eiffel, etc...  The Logical Layer is where the MySQL intelligence resides, it includes functionality for query parsing, analysis, caching and all built-in functions (math, date...). This layer also provides functionality common across the storage engines.  The Physical Layer is responsible for storing and retrieving all data stored in “MySQL”. Associated with this layer are the storage engines, which MySQL interacts with very basic standard API's. Each storage engine has it strengths and weakness, some of this engines are MyISAM, InnoDB, CSV, NDB Cluster, Falcon, etc... Some internal components: 20
  • 21. Each client connection gets its own thread within the server process. When clients (applications) connect to the MySQL server, the server needs to authenticate them. Before even parsing the query, though, the server consults the query cache, which only stores SELECT statements, along with their result sets. The storage engine does affect how the server optimizes query. Storage engines: MySQL supports several storage engines that act as handlers for different table types. MySQL storage engines include both those that handle transaction-safe tables and those that handle non- transaction-safe tables. MySQL Files: 21
  • 22. In Linux the configuration file is typically located at /etc/mysql/my.cnf, but may vary for the different Linux flavours, this also applies to the database files them selves which are located in the /var/lib/MySQL. Regardless of the storage engine, every MySQL table you create is represented, on disk, by a .frm file, which describes the table’s format (i.e. the table definition). The file bears the same name as the table, with a .frm extension. The .frm format is the same on all platforms but in the description of the .frm format that follows, the examples come from tables created under the Linux operating system. /var/lib/mysql/db.frm #Table definition /var/lib/mysql/db.MYD #MyISAM data file /var/lib/mysql/db.MYI #MyISAM Index file /var/lib/mysql/ibdata1 #Innodb data file MySQL Cluster Overview MySQL Cluster is a technology that enables clustering of in-memory databases in a shared- nothing system. The shared-nothing architecture enables the system to work with very inexpensive hardware, and with a minimum of specific requirements for hardware or software. MySQL Cluster is designed not to have any single point of failure. In a shared-nothing system, each component is expected to have its own memory and disk, and the use of shared storage mechanisms such as network shares, network file systems, and SANs is not recommended or supported. MySQL Cluster integrates the standard MySQL server with an in-memory clustered storage engine called NDB (which stands for “Network DataBase”). In our documentation, the term NDB refers to the part of the setup that is specific to the storage engine, whereas “MySQL Cluster” refers to the combination of one or more MySQL servers with the NDB storage engine. A MySQL Cluster consists of a set of computers, known as hosts, each running one or more processes. These processes, known as nodes, may include MySQL servers (for access to NDB data), data nodes (for storage of the data), one or more management servers, and possibly other specialized data access programs. The relationship of these components in a MySQL Cluster is shown here: 22
  • 24. Figure 5.1.6 N-Tier Architecture 24
  • 25. 5.2.1 Java The Java platform is the ideal platform for network computing. Running across all platforms -- from servers to cell phones to smart cards -- Java technology unifies business infrastructure to create a seamless, secure, networked platform for your business. The Java platform benefits from a massive community of developers and supporters that actively work on delivering Java technology-based products and services as well as evolving the platform through an open, community-based, standards organization known as the Java Community Process program. You can find Java technology in cell phones, on laptop computers, on the Web, and even trackside at Formula One Grand Prix races. The fact is today, you can find Java technology just about everywhere! 5.2.2 Business Benefits • A richer user experience - Whether you're using a Java technology-enabled mobile phone to play a game or to access your company's network, the Java platform provides the foundation for true mobility. The unique blend of mobility and security in Java technology makes it the ideal development and deployment vehicle for mobile and wireless solutions. • The ideal execution environment for Web services - The Java and XML languages are the two most extensible and widely accepted computing languages on the planet, providing maximum reach to everyone, everywhere, every time, to every device and platform. • Enabling business from end to end - Java offers a single, unifying programming model that can connect all elements of a business infrastructure. 25
  • 26. 5.2.3 Android 1.1 What is Android? Android is an open source and Linux-based Operating System for mobile devices such as smart phones and tablet computers. Android was developed by the Open Handset Alliance, led by Google, and other companies. Android offers a unified approach to application development for mobile devices which means developers need only develop for Android, and their applications should be able to run on different devices powered by Android. The first beta version of the Android Software Development Kit (SDK) was released by Google in 2007 where as the first commercial version, Android 1.0, was released in September 2008. On June 27, 2012, at the Google I/O conference, Google announced the next Android version, 4.1 Jelly Bean. Jelly Bean is an incremental update, with the primary aim of improving the user interface, both in terms of functionality and performance. The source code for Android is available under free and open source software licenses. Google publishes most of the code under the Apache License version 2.0 and the rest, Linux kernel changes, under the GNU General Public 1.2 History of Android The history and versions of android are interesting to know. The code names of android ranges from A to J currently, such as Aestro, Blender, Cupcake, Donut, Eclair, Froyo,Gingerbread, Honeycomb, Ice Cream Sandwitch,Jelly Bean and KitKat. Let's understand the android history pointy: • Initially, Andy Rubin founded Android Incorporation in Palo Alto, California, United States in October, 2003. • In 17th August 2005, Google acquired android Incorporation. Since then, it is in the subsidiary of Google Incorporation. • The key employees of Android Incorporation are Andy Rubin, Rich Miner, Chris White and Nick Sears. • Originally intended for camera but shifted to smart phones later because of low market for camera only. • Android is the nick name of Andy Rubin given by coworkers because of his love to robots. • In 2007, Google announces the development of android OS. • In 2008, HTC launched the first android mobile. 26
  • 27. 1.3 Features of Android Android is a powerful operating system competing with Apple 4GS and supports great features. Few of them are listed below. 1.4 Feature Description Feature Description Beautiful UI Android OS basic screen provides a beautiful and intuitive user interface. Connectivity GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC and WiMAX. Storage SQLite, a lightweight relational database, is used for data storage purposes. Media support H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1, MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP Messaging SMS and MMS Web browser Based on the open-source WebKit layout engine, coupled with Chrome's V8 JavaScript Engine supporting HTML5 and CSS3. Multi-touch Android has native support for multi-touch which was initially made available in handsets Such as the HTC Hero. Multi- tasking User can jump from one task to another and same time various application can run Simultaneously. Resizable widgets Widgets are resizable, so users can expand them to show more content or shrink them to 27
  • 28. save space Multi- Language Supports single direction and bi-directional text. GCM Google Cloud Messaging (GCM) is a service that lets developers send short message data to their users on Android devices, without needing a proprietary sync solution. Wi-Fi Direct A technology that lets apps discover and pair directly, over a high-bandwidth peer-to-peer connection. Android Beam A popular NFC-based technology that lets users instantly share, just by touching two NFCenabled phones together. 1.5 Android Applications Android applications are usually developed in the Java language using the Android Software Development Kit. Once developed, Android applications can be packaged easily and sold out either through a store such as Google Play or the Amazon Appstore. Android powers hundreds of millions of mobile devices in more than 190 countries around the world. It's the largest installed base of any mobile platform and growing fast. Every day more than 1 million new Android devices are activated worldwide. This tutorial has been written with an aim to teach you how to develop and package Android application. We will start from environment setup for Android application programming and then drill down to look into various aspects of Android applications. Android Versions, Codename and API Let's see the android versions codename and API provided by Google. Version Codename API 28
  • 29. 1.5 Cupcake 3 1.6 Donut 4 2.1 Eclair 7 2.2 Froyo 8 2.3 Gingerbread 9 and 10 3.1 and 3.3 Honeycomb 12 and 13 4.0 Ice Cream Sandwitch 15 4.1, 4.2 and 4.3 Jelly Bean 16, 17 and 18 4.4 KitKat 19 Next 1.6 Android Core Building Blocks 29
  • 30. A component is simply a piece of code that has a well defined life cycle e.g. Activity, Receiver, and Service etc. The core building blocks or fundamental components of android are activities, views, intents, services, content providers, fragments and AndroidManifest.xml. Activity An activity is a class that represents a single screen. It is like a Frame in AWT. View A view is the UI element such as button, label, text field etc. Anything that you see is a view. IntentIntent is used to invoke components. It is mainly used to: • Start the service • Launch an activity • Display a web page • Display a list of contacts • Broadcast a message • Dial a phone call etc. Service Service is a background process that can run for a long time.There are two types of services local and remote. Local service is accessed from within the application whereas remote service is accessed remotely from other applications running on the same device. Content Provider Content Providers are used to share data between the applications. Fragment Fragments are like parts of activity. An activity can display one or more fragments on the screen at the same time. AndroidManifest.xml It contains informations about activities, content providers, permissions etc. It is like the web.xml file in Java EE. 30
  • 31. Android Virtual Device (AVD) It is used to test the android application without the need for mobile or tablet etc. It can be created in different configurations to emulate different types of real devices. 1.7 Android Emulator Android Emulator is used to run, debug and test the android application. If you don't have the real device, it can be the best way to run, debug and test the application.It uses an open source processor emulator technology called QEMU.The emulator tool enables you to start the emulator from the command line. You need to write: emulator -avd <AVD NAME> In case of Eclipse IDE, you can create AVD by Window menu > AVD Manager > New.In the given image, you can see the android emulator, it displays the output of the hello android example. 31
  • 32. 1.8 Installing software for Android Android supports java, c++, c# etc. language to develop android applications. Java is the officially supported language for android. All the android examples of this site is developed using Java language and Eclipse IDE. Here, we are going to tell you, the required softwares to develop android applications using Eclipse IDE. Simple way by ADT Bundle It is the simplest technique to install required softwares for android application. It includes: • Eclipse IDE • Android SDK • Eclipse Plugin If you download the ADT from android site, you don't need to have eclipse IDE, android SDK and eclipse Plugin because it is already included in adt bundle. If you have downloaded the ADT bundle, unjar it, go to eclipse IDE and start the eclipse by clicking on the eclipse icon. You don't need to do any extra steps here. 1.9 How to setup Android for Eclipse IDE In this page, you will learn what softwares are required for running an android application on eclipse IDE. Here, you will be able to learn how to install the android SDK ADT plugin for Eclipse IDE. Let's see the softwares required to setup android for eclipse IDE manually. 1. Install the JDK 2. Download and install the Eclipse for developing android application 3. Download and Install the android SDK 4. Intall the ADT plugin for eclipse 5. Configure the ADT plugin 6. Create the AVD 7. Create the hello android application 1) Install the Java Development Kit (JDK) For creating android application, JDK must be installed if you are developing the android application with Java language. download the JDK 32
  • 33. 2) Download and install the Eclipse IDE for developing the android application For developing the android application using eclipse IDE, you need to install the Eclipse. you can download it from this location download the Eclipse. Eclispe classic version is recommended but we are using the Eclipse IDE for JavaEE Developers (Eclipse Helios). 3) Download and install the android SDK First of all, download the android SDK. In this example we have installed the android SDK for windows (.exe version). Now double click on the exe file, it will be installed. I am using the android 2.2 version here. 4) Download the ADT plugin for eclipse ADT (Android Development Tools) is required for developing the android application in the eclipse IDE. It is the plugin for Eclipse IDE that is designed to provide the integrated environment. For downloading the ADT, you need to follow these steps: 1. Start the eclipse IDE, then select Help > Install new software... 2. In the work with combo box, write https://dl-ssl.google.com/android/eclipse/ 33
  • 34. 3. select the checkbox next to Developer Tools and click next 4. you will see, a list of tools to be downloaded here, click next 5. click finish 6. After completing the installation, restart the eclipse IDE 5) Configuring the ADT plugin After the installing ADT plugin, now tell the eclipse IDE for your android SDK location. For this: 1. Select the Window menu > preferences 2. Now select the android from the left panel. Here you may see a dialog box asking if you want to send the statistics to the google. Click proceed. 3. Click on the browse button and locate your SDK directory e.g. my SDK location is C:Program FilesAndroidandroid-sdk . 4. Click the apply button then OK. 34
  • 35. 6) Create an Android Virtual Device (AVD) For running the android application in the Android Emulator, you need to create and AVD. For creating the AVD: 1. Select the Window menu > AVD Manager 2. Click on the new button, to create the AVD 3. Now a dialog appears, write the AVD name e.g. myavd. Now choose the target android version e.g. android2.2. 4. click the create AVD 1.10 ARCHITECTURE Android operating system is a stack of software components which is roughly divided into five sections and four main layers as shown below in the architecture diagram. Linux kernel At the bottom of the layers is Linux - Linux 2.6 with approximately 115 patches. This provides basic system functionality like process management, memory management, device management like camera, keypad, display etc. Also, the kernel handles all the things that Linux is really good 35
  • 36. at such as networking and a vast array of device drivers, which take the pain out of interfacing to peripheral hardware. Libraries On top of Linux kernel there is a set of libraries including open-source Web browser engine WebKit, well known library libc, SQLite database which is a useful repository for storage and sharing of application data, libraries to play and record audio and video, SSL libraries responsible for Internet security etc. Android Runtime This is the third section of the architecture and available on the second layer from the bottom. This section provides a key component called Dalvik Virtual Machine which is a kind of Java Virtual Machine specially designed and optimized for Android. The Dalvik VM makes use of Linux core features like memory management and multi-threading, which is intrinsic in the Java language. The Dalvik VM enables every Android application to run in its own process, with its own instance of the Dalvik virtual machine. The Android runtime also provides a set of core libraries which enable Android application developers to write Android applications using standard Java programming language. Application Framework The Application Framework layer provides many higher-level services to applications in the form of Java classes. Application developers are allowed to make use of these services in their applications. Applications You will find all the Android application at the top layer. You will write your application to be installed on this layeronly. Examples of such applications are Contacts Books, Browser, Games etc. 1.11Application Components Application components are the essential building blocks of an Android application. These components are loosely coupled by the application manifest file AndroidManifest.xml that 36
  • 37. describes each component of the application and how they interact.There are following four main components that can be used within an Android application: Activities: They they dictate the UI and handle the user interaction to the smartphone screen Services They handle background processing associated with an application. Broadcast Receivers They handle communication between Android OS and applications. Content Providers They handle data and database management issues. Activities An activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. If an application has more than one activity, then one of them should be marked as the activity that is presented when the application is launched. An activity is implemented as a subclass of Activity class as follows: public class MainActivity extends Activity { } Services A service is a component that runs in the background to perform long-running operations. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity.A service is implemented as a subclass of Service class as follows: public class MyService extends Service { Simply Easy Learning } Broadcast Receivers Broadcast Receivers simply respond to broadcast messages from other applications or from the system. Forexample, applications can also initiate broadcasts to let other applications know that some data has beendownloaded to the device and is available for them to use, so this is broadcast 37
  • 38. receiver who will intercept thiscommunication and will initiate appropriate action.A broadcast receiver is implemented as a subclass of BroadcastReceiver class and each message is broadcasted as an Intent object. public class MyReceiver extends BroadcastReceiver { } Content Providers A content provider component supplies data from one application to others on request. Such requests are handled by the methods of the ContentResolver class. The data may be stored in the file system, the database or somewhere else entirely. A content provider is implemented as a subclass of ContentProvider class and must implement a standard set of APIs that enable other applications to perform transactions. public class MyContentProvider extends ContentProvider { } Additional Components There are additional components which will be used in the construction of above mentioned entities, their logic,and wiring between them. These components are: Components Description Fragments Represents a behavior or a portion of user interface in an Activity. Views UI elements that are drawn onscreen including buttons, lists forms etc. Layouts View hierarchies that control screen format and appearance of the views. Intents Messages wiring components together. Resources External elements, such as strings, constants and drawables pictures. Manifest Configuration file for the application. 1.12Android Life Cycle of Activity We can control and manage the resource through the life cycle methods of activity. There are 7 life cycle methods of android.app.Activity class. They are as follows: 38
  • 39. Method Description onCreate called when activity is first created. onStart called when activity is becoming visible to the user. onResume called when activity will start interacting with the user. onPause called when activity is not visible to the user. onStop called when activity is no longer visible to the user. onRestart called after your activity is stopped, prior to start. onDestroy called before the activity is destroyed. 39
  • 40. 40
  • 41. 1.13 Dalvik Virtual Machine As we know the modern JVM is high performance and provides excellent memory management. But it need to be optimized for low-powered handheld devices. The Dalvik Virtual Machine (DVM) is optimized for mobile devices. It optimizes the JVM formemory, battery life and performance.Dalvik is a name of a town in Iceland. The Dalvik VM was written by Dan Bornstein.The Dex compiler converts the class files into the .dex files that run on the Dalvik VM.Let's see the compiling and packaging process from the source file: The javac tool compiles the java source file into the class file. The dx tool takes all the class files of your application and generates a single .dex file. It is a platform-specific tool. The Android Assets Packaging Tool (aapt) handles the packaging process. CHAPTER - VI SYSTEM IMPLEMENTATION 41
  • 42. 6.1 Client Side Coding 6.2 Server Side Coding } CHAPTER - VII TESTING SYSTEM TESTING AND MAINTENANCE TESTING: Testing is a set of activities that can be planned in advance and conducted systematically. For this reason a template for software testing, a set of steps into which we can place specific test case design techniques and testing methods should be defined for software process. Testing often accounts for more effort than any other software engineering activity. If it is conducted haphazardly, time is wasted, unnecessary effort is expanded, and even worse, errors sneak through undetected. It would therefore seem reasonable to establish a systematic strategy for testing software 42
  • 43. TYPE OF TESTING There are two type of testing according their behaviors I. Unconventional Testing II. Conventional Testing UNCONVENTIONAL TESTING Unconventional testing is a process of verification which is doing by SQA (Software Quality Assurance) team. It is a prevention technique which is performing from beginning to ending of the project development. In this process SQA team verifying the project development activities and insuring that the developing project is fulfilling the requirement of the client or not. In this testing the SQA team follows these methods: 1. Peer review 2. Code walk and throw 3. Inspection 4. Document Verification CONVENTIONAL TESTING 43
  • 44. Conventional Testing is a process of finding the bugs and validating the project. Testing team involves in this testing process and validating that developed project is according to client requirement or not. This process is a correction technique where testing team find bugs and reporting to the development team for correction on developed project built. UNIT TESTING: The procedure level testing is made first. By giving improper inputs, the errors occurred are noted and eliminated. Then the web form level testing is made. For example storage of data to the table in the correct manner. In the company as well as seeker registration form, the zero length username and password are given and checked. Also the duplicate username is given and checked. In the job and question entry, the button will send data to the server only if the client side validations are made. The dates are entered in wrong manner and checked. Wrong email-id and web site URL (Universal Resource Locator) is given and checked. 44
  • 45. INTEGRATION TESTING: Testing is done for each module. After testing all the modules, the modules are integrated and testing of the final system is done with the test data, specially designed to show that the system will operate successfully in all its aspects conditions. Thus the system testing is a confirmation that all is correct and an opportunity to show the user that the system works. MODULE TESTING: Module Testing is a process of testing the system, module by module. It includes the various inputs given, outputs produced and their correctness. By testing in this method we would be very clear of all the bugs that have occurred. INTERFACE TESTING: 45
  • 46. The Interface Testing is performed to verify the interfaces between sub modules while performing integration of sub modules aiding master module recursively. VALIDATION TESTING: The final step involves Validation testing, which determines whether the software function as the user expected. The end-user rather than the system developer conduct this test most software developers as a process called “Alpha and Beta were testing” to uncover that only the end user seems able to find. The compilation of the entire project is based on the full satisfaction of the end users. In the project, validation testing is made in various forms. MAINTENANCE: The objectives of this maintenance work are to make sure that the system gets into work all time without any bug. Provision must be for environmental changes which may affect the computer or software system. This is called the maintenance of the system. Nowadays there is the rapid change in the software world. Due to this rapid change, the system should be capable of adapting 46
  • 47. these changes. In our project the process can be added without affecting other parts of the system. Maintenance plays a vital role. The system liable to accept any modification after its implementation. This system has been designed to favour all new changes. Doing this will not affect the system’s performance or its accuracy. TESTING STRATEGIES • A number of software testing strategies have been proposed in the literature. All provide the software developer with a template for testing and all have the following generic characteristics: • • Testing begins at the component level and works “outward” toward the integration of the entire computer-based system. • Different testing techniques are appropriate at different points in time. 47
  • 48. • The developer of the software conducts testing and for large projects, independent test group. • Testing and debugging are different activitccommodated in any testing strategy. CHAPTER - VIII PERFORMANCE AND LIMITATION 8.1 Conclusion We are Developing an Android based User Interface for Fetching the Nearest available Bus, its Time to reach the Source and the Distance which will surely avoid the waiting time for Android User. 8.1.1 Merits of the System 1. Blind People can read their incoming through voice output. And also they can identify the phone number. 2. They can identify the incoming phone number through voice output. 48
  • 49. 3. Identify the current location when they travel to different place through voice output of every two minutes. 4. The blind people can also access the smart phone through my application. 8.1.2 Limitations of the System 1. Missed call cannot able to define by blind people. 2. Unread SMS cannot able to define and read. 3. Satellite breakage happen means they cannot able to find the location. 8.2 Future Enhancements 49
  • 50. APPENDICES 9.1 Sample Screens REFERENCES Book References [15] M. Haridasan, I. Mohomed, D. Terry, C. A. Thekkath, and L. Zhang, “Startrack next generation: A scalable infrastructure for track-based applications,” in Proc. USENIX OSDI, 2010. [16] M. Keally, G. Zhou, G. Xing, J. Wu, and A. Pyles, “PBN: Towards practical activity recognition using smartphone-based body sensor networks,” in Proc. ACM SenSys, Seattle, WA, USA, 2011, pp. 246–259. [17] F. Li, Y. Yu, H. Lin, and W. Min, “Public bus arrival time prediction based on traffic information management system,” in Proc. IEEE SOLI, Beijing, China, 2011, pp. 336–341. 50
  • 51. [18] Y. Liu, L. Chen, J. Pei, Q. Chen, and Y. Zhao, “Mining frequent trajectory patterns for activity monitoring using radio frequency tag arrays,” in Proc. IEEE PerCom, White Plains, NY, USA, 2007. [19] H. Lu, W. Pan, N. D. Lane, T. Choudhury, and A. T. Campbell, “SoundSense: Scalable sound sensing for people-centric applications on mobile phones,” in Proc. ACM MobiSys, Kraków, Poland, 2009, pp. 165–178. [20] J. Paek, J. Kim, and R. Govindan, “Energy-efficient rate-adaptive GPS-based positioning for smartphones,” in Proc. ACM MobiSys, San Francisco, CA, USA, 2010, pp. 299–314. [21] J. Paek, K.-H. Kim, J. P. Singh, and R. Govindan, “Energy-efficient positioning for smartphones using cell-ID sequence matching,” in Proc. ACM MobiSys, Bethesda, MD, USA, 2011, pp. 293–306. [22] C. Peng, G. Shen, Y. Zhang, Y. Li, and K. Tan, “BeepBeep: A high accuracy acoustic ranging system using COTS mobile devices,” in Proc. ACM SenSys, Sydney, NSW, Australia, 2007, pp. 1–14. [23] S. Reddy et al., “Using mobile phones to determine transportation modes,” ACM Trans. Sensor Netw., vol. 6, no. 2, pp. 1–27, Mar. 2010. [24] A. Thiagarajan, J. Biagioni, T. Gerlich, and J. Eriksson, “Cooperative transit tracking using smart-phones,” in Proc. ACM SenSys, Zurich, Switzerland, 2010, pp. 85–98. [25] A. Thiagarajan, L. Ravindranath, H. Balakrishnan, S. Madden, and L. Girod, “Accurate, low-energy trajectory mapping for mobile devices,” in Proc. USENIX NSDI, Berkeley, CA, USA, 2011. Web References [1] www.android developer.com [2] www.analog.com/DSP-Software-Kit [3] http://developer.android.com/sdk/ [4] www.w3school.com [5] http://developer.samsung.com/android/technical-docs/Gestures-in-Android 51
  • 52. 52