delhi route planner - docx

116
Delhi Route Planner over Android 2.2 2012 PROJECT REPORT On DELHI ROUTE PLANNER OVER ANDROID 2.2 SUBMITTED TO SRI SAI COLLEGE OF ENGINEERING AND TECHNOLOGY BADHANI, PATHANKOT In partial fulfilment of the requirement for the award of the Post Graduate Program of Master of Computer Application SESSION (2009-2012) 1

Upload: adan-thakur

Post on 30-Dec-2015

197 views

Category:

Documents


0 download

DESCRIPTION

Delhi Route Planner

TRANSCRIPT

Delhi Route Planner over Android 2.2 2012

PROJECT REPORT

On

DELHI ROUTE PLANNER OVER ANDROID 2.2

SUBMITTED TO

SRI SAI COLLEGE OF ENGINEERING AND TECHNOLOGY

BADHANI, PATHANKOT

In partial fulfilment of the requirement for the award of the

Post Graduate Program of

Master of Computer Application

SESSION (2009-2012)

SUBMITTED BY SUPERVISOR

Bhawani singh Mr. Sanjay Pandit

ROLL NO.90752130769 (M.C.A. 6th SEM )

1

Delhi Route Planner over Android 2.2 2012

TO WHOMSOVER IT MAY CONCERN

This is to certify that the project report titled " DelhiRoutePlanner over Android 2.2

” carried out by Mr. Bhawani Singh s/o sh. Malkiat Singh has been accomplish under guidance &

supervision as a duly registered MCA student of Sri Sai College of engineering and technology.

This project is being submitted by her in the partial fulfillment of the requirement for the award of

the master of Computer Application from Sri Sai College of engineering and technology.

His project work represents his original work and is worthy of consideration for the award of degree

of Master of Computer Application.

(Name and signature of the faculty advisor)

Title:

Date:

2

Delhi Route Planner over Android 2.2 2012

ACKNOWLEDGEMENTS

These are all by the grace of one Supreme Being, whose blessings, furnished the

inspiration for undertaking his endeavor.

A formal statement of acknowledgement will hardly meet the ends of justice in the

expression of my deep sense of gratitude to my major advisor, Mr.Sanjay Pandit for his above

guidance, pertinent criticism and ever willing help through out the period of present investigation,

which led to the successful completion of this project.

Words are not sufficient to register my sincere regards to my loving parents and

family members for their deep affection and unabated inspiration that really kept me going.

Lastly, I wish to thanks all the respondents who extended their whole hearted

cooperation.

Bhawani Singh

MCA STUDENT

3

Delhi Route Planner over Android 2.2 2012

CERTIFICATE

This to certify that the project report entitled “ Delhi Route Planner over Android 2.2

” has been developed by Bhawani Singh during the academic year 2009-2012 is a bonafied

piece of work conducted under my supervision and guidance. The data sources have been

duly acknowledged.

I wish him success in all his future endeavours.

SUPERVISED BY

MR.SANJAY PANDIT MR.ASHISH MISHRA

(HEAD OF DEPARTMENT) (PROJECT GUIDE)

4

Delhi Route Planner over Android 2.2 2012

PREFACE

AADI offers Professional Android Application Development, the professional Android developers develop real-world mobile applications for Android phones. For developing high quality and professional Android applications, company’s professionals are fully up-to-date with all the new and old versions of the Android operating system, which helps them develop apps for different devices easily. The Android professionals of the company are proficient in optimum utilization of latest SDK such as utilization of its all essential features and capabilities that ultimately helps them for constructing increasingly complex, useful, and innovative mobile applications for Android phones. Being a professional company, the developers of the company offers professional apps development with complete knowledge of Android apps and their lifecycle, the application manifest, intents and best use of external resources.

High proficiency in the technical and non technical aspects is very vital for professional Android apps development. The technical proficiency of the company allows them to make most of the mobile portability. The professional Android developers have complete understanding of the Android SDK and Framework APIs as well as Java programming language. They utilize the mobile portability by creating rich map-based applications as well as using location-based services and the geocoder. One of the higher officials of the company states that “our Android experts are technically strong for professional Android application development such as they have knowledge of Android's communication abilities and Android hardware, which ultimately helps them meet all the specific needs of the clients.” Creating applications for the Android mobile phone platform professional is company’s main aim that eventually helps the company to achieve the highest satisfaction level of the offshore clients. For the high quality professional services and costs saving mechanism of the company helps the clients for saving the money and ensures the timely delivery of the projects. The Company is offering android application development professionally through professional Android developers/programmers.

. In this project report, steps have been taken for computerizing Delhi Route Planner over Android 2.2 .The analysis of the project has been undertaken with utmost sincerity and honesty and we will be extremely satisfied if the effort is appreciated

5

Delhi Route Planner over Android 2.2 2012

DECLARATION

I, Bhawani Singh , here by declare that this Project titled “DelhiRoutePlanner over Android 2.2” Is based on live project study conduced by me under the guidance of Mr.Ashish Mishra & Mr. Sanjay Pandit Sir

This project has not been submitted earlier for the award of any other

Degree/diploma to any other Institute or University.

PLACE: Bhawani Singh

DATE : M C A 6th (90752130769)

6

Delhi Route Planner over Android 2.2 2012

CONTENTS

PROBLEM DEFINITION INTRODUCTION INTRODUCTION TO COMPANY OVERVIEW OF APPLICATION TEAM DETAILS PLATFORM USED ANDROID PLATFORM USER PLATFORM HARDWARE PLATFORM SOFTWARE PLATFORM : PROJECT PLANNING FUNCTIONAL REQUIREMENTS NON-FUNCTIONAL REQUIRMENTS ANALYSIS DFD Level-0 DFD Level-1 DFD Level-2 Entity Relationship Diagram ER Diagram FUTURE SCOPE PROJECT SNAPSHOT

CONCLUSION REFERENCES

7

Delhi Route Planner over Android 2.2 2012

ABSTRACT

Android is a software stack for mobile devices that includes an operating system, middleware

and key applications. Android is a software platform and operating system for mobile devices based

on the Linux operating system and developed by Google and the Open Handset Alliance. It allows

developers to write managed code in a Java-like language that utilizes Google-developed Java

libraries, but does not support programs developed in native code.

The unveiling of the Android platform on 5 November 2007 was announced with the

founding of the Open Handset Alliance, a consortium of 34 hardware, software and telecom

companies devoted to advancing open standards for mobile devices. When released in 2008, most of

the Android platform will be made available under the Apache free-software and open-source

license.

Open - Android allows to access core mobile device functionality through standard API calls.

All applications are equal - Android does not differentiate between the phone's basic and third-party

applications -- even the dialer or home screen can be replaced. Breaking down boundaries - Combine

information from the web with data on the phone -- such as contacts or geographic location -- to cre-

ate new user experiences. Fast and easy development - The SDK contains what need to build and run

Android applications, including a true device emulator and advanced debugging tools.

8

Delhi Route Planner over Android 2.2 2012

INTRODUCTION

Android is a software stack for mobile devices that includes an operating system, middleware

and key applications. Android is a software platform and operating system for mobile devices based

on the Linux operating system and developed by Google and the Open Handset Alliance. It allows

developers to write managed code in a Java-like language that utilizes Google-developed Java

libraries, but does not support programs developed in native code.

The unveiling of the Android platform on 5 November 2007 was announced with the

founding of the Open Handset Alliance, a consortium of 34 hardware, software and telecom

companies devoted to advancing open standards for mobile devices. When released in 2008, most of

the Android platform will be made available under the Apache free-software and open-source

license.

THE BIRTH OF ANDROID

Google Acquires Android Inc.

In July 2005, Google acquired Android Inc., a small startup company based in Palo Alto, CA.

Android's co-founders who went to work at Google included Andy Rubin (co-founder of Danger),

Rich Miner (co-founder of Wildfire Communications, Inc), Nick Sears (once VP at T-Mobile), and

Chris White (one of the first engineers at WebTV). At the time, little was known about the functions

of Android Inc. other than they made software for mobile phones.

Open Handset Alliance Founded

On 5 November 2007, the Open Handset Alliance, a consortium of several companies which

include Google, HTC, Intel, Motorola, Qualcomm, T-Mobile, Sprint Nextel and NVIDIA, was

unveiled with the goal to develop open standards for mobile devices. Along with the formation of the

Open Handset Alliance, the OHA also unveiled their first product, Android, an open source mobile

device platform based on the Linux operating system.

Hardware

Google has unveiled at least three prototypes for Android, at the Mobile World Congress on

February 12, 2008. One prototype at the ARM booth displayed several basic Google applications. A

'd-pad' control zooming of items in the dock with a relatively quick response.

9

Delhi Route Planner over Android 2.2 2012

FEATURES OF ANDROID OS

· Application framework enabling reuse and replacement of components

· Dalvik virtual machine optimized for mobile devices

· Integrated browser based on the open source WebKit engine

· Optimized graphics powered by a custom 2D graphics library; 3D graphics based on

the OpenGL ES 1.0 specification (hardware acceleration optional)

· SQLite for structured data storage

· Media support for common audio, video, and still image formats (MPEG4, H.264,

MP3, AAC, AMR, JPG, PNG, GIF)

· GSM Telephony (hardware dependent)

· Bluetooth, EDGE, 3G, and WiFi (hardware dependent)

· Camera, GPS, compass, and accelerometer (hardware dependent)

· Rich development environment including a device emulator, tools for debugging,

memory and performance profiling, and a plugin for the Eclipse IDE

10

Delhi Route Planner over Android 2.2 2012

ANDROID ARCHITECTURE

 

The following diagram shows the major components of Android  

 

Figure 1: Architecture of Android OS

 

11

Delhi Route Planner over Android 2.2 2012

APPLICATION FRAMEWORK

Developers have full access to the same framework APIs used by the core applications. The

application architecture is designed to simplify the reuse of components; any application can publish

its capabilities and any other application may then make use of those capabilities (subject to security

constraints enforced by the framework). This same mechanism allows components to be replaced by

the user.

Underlying all applications is a set of services and systems, including:

  ·        A rich and extensible set of Views that can be used to build an application, including lists,

grids, text boxes, buttons, and even an embeddable web browser

·        Content Providers that enable applications to access data from other applications (such as

Contacts), or to share their own data

·        A Resource Manager, providing access to non-code resources such as localized strings,

graphics, and lat files

·        A Notification Manager that enables all applications to display custom alerts in the status bar

·        An Activity Manager that manages the life cycle of applications and provides a common

navigation backstack

12

Delhi Route Planner over Android 2.2 2012

LIBRARIES

Android includes a set of C/C++ libraries used by various components of the Android system. These

capabilities are exposed to developers through the Android application framework. Some of the core

libraries are listed below:

·        System C library - a BSD-derived implementation of the standard C system library (libc),

tuned for embedded Linux-based devices

·        Media Libraries - based on PacketVideo's Open CORE; the libraries support playback and

recording of many popular audio and video formats, as well as static image files, including MPEG4,

H.264, MP3, AAC, AMR, JPG, and PNG

·        Surface Manager - manages access to the display subsystem and seamlessly composites 2D

and 3D graphic layers from multiple applications

·        LibWebCore - a modern web browser engine which powers both the Android browser and an

embeddable web view

·        SGL - the underlying 2D graphics engine

·        3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either

hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer

·        Free Type - bitmap and vector font rendering

SQLite - a powerful and lightweight relational database engine available to all applications.

13

Delhi Route Planner over Android 2.2 2012

ANDROID RUNTIME

Android includes a set of core libraries that provides most of the functionality available in the

core libraries of the Java programming language. Every Android application runs in its own process,

with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run

multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format

which is optimized for minimal memory footprint. The VM is register-based, and runs classes

compiled by a Java language compiler that have been transformed into the .dex format by the

included "dx" tool. The Dalvik VM relies on the Linux kernel for underlying functionality such as

threading and low-level memory management.

At the same level there is Android Runtime, where the main component Dalvik Virtual

Machine is located. It was designed specifically for Android running in limited environment, where

the limited battery, CPU, memory and data storage are the main issues. Android gives an integrated

tool “dx”, which converts generated byte code from .jar to .dex file, after this byte code becomes

much more efficient to run on the small processors.

 

Figure 2: Conversion from .java to .dex file 

As the result, it is possible to have multiple instances of Dalvik virtual machine running on

the single device at the same time. The Core libraries are written in Java language and contains of the

collection classes, the utilities, IO and other tools.

LINUX KERNAL

Android Architecture is based on Linux 2.6 kernel. It helps to manage security, memory

management, process management, network stack and other important issues. Therefore, the user

should bring Linux in his mobile device as the main operating system and install all the drivers

required in order to run it. Android provides the support for the Qualcomm MSM7K chipset family.

For instance, the current kernel tree supports Qualcomm MSM 7200A chipsets, but in the second half

14

Delhi Route Planner over Android 2.2 2012

of 2008 we should see mobile devices with stable version Qualcomm MSM 7200, which includes

major features:

1. WCDMA/HSUPA and EGPRS network support

2. Bluetooth 1.2 and Wi-Fi support

3. Digital audio support for mp3 and other formats

4. Support for Linux and other third-party operating systems

5. Java hardware acceleration and support for Java applications

6. Qcamera up to 6.0 megapixels

7. gpsOne – solution for GPS

15

Delhi Route Planner over Android 2.2 2012

ARCHITECTURE FOR SECURE DATA STORAGE

Figure 3 Android and Secure Local Data Storage

Secure data storage solution that could potentially be deployed on Android. It is as shown in

the figure. However, many shortcomings of the design have been addressed. Additional security

highlights will be presented at the end of the section.

Using figure 3, we have the following workflow:

1. The user enters his credentials on the handset.

2. The credentials are not sent to the SSO service over the network. Instead, the credentials are

used as the passphrase to decrypt the local public/private key pair of the user. We define the

public/private key pair to be of type RSA and of at least 4096 bits in size. Already we gain the

advantage that the user’s password is not sent over the network.

3. The private key is used to decrypt the symmetric cipher key. The symmetric cipher key is used

to encrypt/decrypt any locally cached data. A strong symmetric cipher like 3DES is used.

4. All data found in the local cache is encrypted with the symmetric cipher key defined in step

#3.

16

Delhi Route Planner over Android 2.2 2012

5. If the requested data is not locally cached or expired. We must communicate with the SSO

service again to be able to receive fresh data from the Restful web services. However, unlike

the architecture presented in section 2 of this document, we login to the SSO server using a

hostile challenge based on the private key of the user. As such, we login with the SSO system

using public/private key infrastructure. The user name and the password are never sent over

the network. The SSO system can identify the user based on this challenge and returns a 496

bit alpha numeric token.

6. The tokens generated by the SSO system are set to automatically expire after a given period of

time.

7. On reception of the SSO token. The Android background application can now communicate

with any Restful web services that adhere to the same SSO federation. Public/private key

infrastructure is once again used to setup a secure communication channel between the phone

and the server. The certificates of the servers that host the web services are procured from the

same certificate authority that shipped with the phone.

8. On reception of a request, the SSO token is extracted from the request. The web service calls

upon the SSO system to authorize the operation.

9. On reception of the data, the symmetric cipher described in bullet #3 above is used to encrypt

the data before it reaches any local persistent storehouse.

10. Data is returned to the user facing application.

Additional security notes:

1. The public/private key pair of the user is generated directly on the handset at install time.

As such, the private key has never left the phone nor has it been transferred over any network.

2. The certificate of the user must at least be registered once in the SSO application. This

could be done at install time of the handset application.

3. “Man-in-the-middle”38 attacks are not possible since the application is deployed with the

CA certificate of the company that will be hosting the web services.

4. If the device is lost, all the locally cached data is completely unreadable. The symmetric

key that encrypted this data is also unreadable. The public/private keys that are central to the security

architecture are protected by a passphrase.

5. The passphrase is the weakest link in the chain. If the user enters an overly simple

password, access could be gained to the private key and hence the locally cached data.

6. That being said, it would be possible to further extend this architecture to store the

encrypted symmetric key on the server. This way, even if the passphrase of the private key is 17

Delhi Route Planner over Android 2.2 2012

compromised, the locally cached data still cannot be accessed. This is because the encrypted strong

symmetric cipher key is stored on the server. By the time the passphrase has been cracked, there has

been ample time to report the stolen phone and revoke this key from this user account on the server.

Furthermore, under this scheme, the key stored on the server is still encrypted. Even if this key is

intercepted in transit it is useless without the user’s private key.

7. It is also possible to enforce a strong password policy directly from the handset application.

8. Even if this design is significantly more secure than the previous iteration, to the user, the

experience is the same. The user must enter a username and password to prove his identify.

9. We could augment the architecture in yet another direction. The local caching system could

also require an SSO token and subsequently request authorization from an SSO system. Such a

design would prevent terminated employees, i.e., an Individual who already knows what the local

credentials are, from accessing the locally cached data.

18

Delhi Route Planner over Android 2.2 2012

EXECUTION ENVIRONMENT

Figure 4 Regular Java Execution Process

19

Delhi Route Planner over Android 2.2 2012

Figure 5 Android Execution Environment

20

Delhi Route Planner over Android 2.2 2012

Figures 4 and 5 represent the regular Java and Android execution paths respectively. It is

interesting to note here however is that the Android compilers do not operate on Java

language code. Instead, the Android translators work on the resulting Java bytecode emitted from a

traditional Java compiler.

As such, it is possible to reuse existing Java libraries, even if the original source code is not

available. Such libraries must meet stringent requirements however, they need to:

1. adhere to the Java SE 5 dialect

2. not use any Java classes or packages found in Java SE 5 not found in the Android

platform

3. not use any packages or classes specific to the Sun Microsystems platform

4. still behave in a predictable manner under the Apache Harmony Java environment

Following these guidelines, it’s possible to integrate existing Java source code, packages and

libraries piecemeal. Special care will be needed in the integration phase of such code but the potential

savings offered by such integration far outweighs the cost of rewriting well-coded, well-documented

and well-tested libraries ready for use. Furthermore, it is expected that has Apache Harmony matures,

more and more compatibility issues will be resolved further increasing the pool of available Java

code that will be able to execute unmodified under the Android platform.

21

Delhi Route Planner over Android 2.2 2012

THE DALVIK VIRTUAL MACHINE

The Dalvik Virtual Machine

The Dalvik virtual machine is an interpreter only machine optimized for use on low powered,

low memory devices like phones. Notably, Dalvik does not make use of just in time (JIT)

Compilation to improve the performance of an application at runtime. Furthermore, Dalvik is not a

Java virtual machine. This is because Dalvik is unable to read Java bytecode34, instead it uses its

own bytecode format called “dex”. Google claims this format allows battery power to be better-

conserved at all different stages of execution of an application. This means that standard Java SE

applications and libraries cannot be used directly on the Android Dalvik virtual machine.

Dalvik however stands at the center of the Android value proposition. Its low electrical power

consumption, rich libraries, and unified, non-fragmented application programming interfaces make it

stand out, or so Google hopes, over the fragmented ecosystem that is Java ME35 today.

Furthermore, since Dalvik uses the Java programming language but not the Java execution

environment (JVM), Google is free to develop Android without the need to license or obtain

certification from Sun Microsystems Inc, the legal owner of the Java trademark and brands.

22

Delhi Route Planner over Android 2.2 2012

LIFECYCLE OF AN ANDROID APPLICATION

In most cases, every Android application runs in its own Linux process. This process is

created for the application when some of its code needs to be run, and will remain running until it is

no longer needed and the system needs to reclaim its memory for use by other applications.

An important and unusual feature of Android is that an application process's lifetime is not

directly controlled by the application itself. Instead, it is determined by the system through a

combination of the parts of the application that the system knows are running, how important these

things are to the user, and how much overall memory is available in the system.

It is important that application developers understand how different application components

(in particular Activity, Service, and IntentReceiver) impact the lifetime of the application's process.

Not using these components correctly can result in the system killing the application's process

while it is doing important work.

A common example of a process life-cycle bug is an IntentReceiver that starts a thread when

it receives an Intent in its onReceiveIntent() method, and then returns from the function. Once it

returns, the system considers that IntentReceiver to be no longer active, and thus its hosting process

no longer needed (unless other application components are active in it). Thus, it may kill the process

at any time to reclaim memory, terminating the spawned thread that is running in it. The solution to

this problem is to start a Service from the IntentReceiver, so the system knows that there is still active

work being done in the process.

To determine which processes should be killed when low on memory, Android places them

into an "importance hierarchy" based on the components running in them and the state of those

components. These are, in order of importance:

1.    A foreground process is one holding an Activity at the top of the screen that the user is

interacting with (its onResume () method has been called) or an IntentReceiver that is currently

running (its onReceiveIntent () method is executing). There will only ever be a few such processes in

the system, and these will only be killed as a last resort if memory is so low that not even these

processes can continue to run. Generally at this point the device has reached a memory paging state,

so this action is required in order to keep the user interface responsive.

2.    A visible process is one holding an Activity that is visible to the user on-screen but not in

the foreground (its onPause() method has been called). This may occur, for example, if the

23

Delhi Route Planner over Android 2.2 2012

foreground activity has been displayed with a dialog appearance that allows the previous activity to

be seen behind it. Such a process is considered extremely important and will not be killed unless

doing so is required to keep all foreground processes running.

3.    A service process is one holding a Service that has been started with the startService()

method. Though these processes are not directly visible to the user, they are generally doing things

that the user cares about (such as background mp3 playback or background network data upload or

download), so the system will always keep such processes running unless there is not enough

memory to retain all foreground and visible process.

4.    A background process is one holding an Activity that is not currently visible to the user

(its onStop() method has been called). These processes have no direct impact on the user experience.

Provided they implement their activity life cycle correctly (see Activity for more details), the system

can kill such processes at any time to reclaim memory for one of the three previous processes types.

Usually there are many of these processes running, so they are kept in an LRU list to ensure the

process that was most recently seen by the user is the last to be killed when running low on memory.

5.    An empty process is one that doesn't hold any active application components. The only

reason to keep such a process around is as a cache to improve startup time the next time a component

of its application needs to run. As such, the system will often kill these processes in order to balance

overall system resources between these empty cached processes and the underlying kernel caches.

When deciding how to classify a process, the system picks the most important level of all the

components currently active in the process.

24

Delhi Route Planner over Android 2.2 2012

SECURITY AND PERMISSIONS IN ANDROID

Android is a multi-process system, where each application (and parts of the system) runs in its

own process. Most security between applications and the system is enforced at the process level

through standard Linux facilities, such as user and group IDs that are assigned to applications.

Additional finer-grained security features are provided through a "permission" mechanism that

enforces restrictions on the specific operations that a particular process can perform.

Android mobile phone platform is going to be more secure than Apple’s iPhone or any other

device in the long run. There are several solutions nowadays to protect Google phone from various

attacks. One of them is security vendor McAfee, a member of Linux Mobile (LiMo) Foundation.

This foundation joins particular companies to develop an open mobile-device software platform.

Many of the companies listed in the LiMo Foundation have also become members of the Open

Handset Alliance (OHA).

As a result, Linux secure coding practice should successfully be built into the Android

development process. However, open platform has its own disadvantages, such as source code

vulnerability for black-hat hackers. In parallel with great opportunities for mobile application

developers, there is an expectation for exploitation and harm. Stealthy Trojans hidden in animated

images, particular viruses passed from friend to friend, used for spying and identity theft, all these

threats will be active for a long run.

Another solution for such attacks is SMobile Systems mobile package. Security Shield –an

integrated application that includes anti-virus, anti-spam, firewall and other mobile protection is up

and ready to run on the Android operating system. Currently, the main problem is availability for

viruses to pose as an application and do things like dial phone numbers, send text messages or multi-

media messages or make connections to the Internet during normal device use. It is possible for

somebody to use the GPS feature to track a person’s location without their knowledge. Hence

SMobile Systems is ready to notify and block these secure alerts. But the truth is that it is not

possible to secure r mobile device or personal computer completely, as it connects to the internet.

And neither the Android phone nor other devices will prove to be the exception.

25

Delhi Route Planner over Android 2.2 2012

DEVELOPMENT TOOLS

The Android SDK includes a variety of custom tools that help develop mobile applications

on the Android platform. The most important of these are the Android Emulator and the Android

Development Tools plugin for Eclipse, but the SDK also includes a variety of other tools for

debugging, packaging, and installing r applications on the emulator.

Android Emulator

A virtual mobile device that runs on computer use the emulator to design, debug, and test r

applications in an actual Android run-time environment.

Android Development Tools Plugin for the Eclipse IDE

The ADT plugin adds powerful extensions to the Eclipse integrated environment, making

creating and debugging r Android applications easier and faster. If use Eclipse, the ADT plugin

gives an incredible boost in developing Android applications:

       It gives access to other Android development tools from inside the Eclipse IDE. For

example, ADT lets access the many capabilities of the DDMS tool — taking screenshots, managing

port-forwarding, setting breakpoints, and viewing thread and process information — directly from

Eclipse.

       It provides a New Project Wizard, which helps quickly create and set up all of the basic

files’ll need for a new Android application.

       It automates and simplifies the process of building r Android application.

       It provides an Android code editor that helps write valid XML for r Android manifest and

resource files.

Dalvik Debug Monitor Service (ddms)

Integrated with Dalvik, the Android platform's custom VM, this tool lets manage processes on

an emulator or device and assists in debugging. can use it to kill processes, select a specific process

to debug, generate trace data, view heap and thread information, take screenshots of the emulator or

device, and more.

Android Debug Bridge (adb) 26

Delhi Route Planner over Android 2.2 2012

The adb tool lets install application's .apk files on an emulator or device and access the

emulator or device from a command line. can also use it to link a standard debugger to application

code running on an Android emulator or device.

Android Asset Packaging Tool (aapt)

The aapt tool lets create .apk files containing the binaries and resources of Android

applications.

Android Interface Description Language (aidl)

Aidl Lets generate code for an interprocess interface, such as what a service might use.

sqlite3

Included as a convenience, this tool lets access the SQLite data files created and used by

Android applications.

Trace view

This tool produces graphical analysis views of trace log data that can generate from r

Android application.

mksdcard

Helps create a disk image that can use with the emulator, to simulate the presence of an

external storage card (such as an SD card).

dx

The dx tool rewrites .class bytecode into Android bytecode (stored in .dex files.)

activityCreator

A script that generates Ant build files that can use to compile r Android applications. If are

developing on Eclipse with the ADT plugin, won't need to use this script.

 

 

27

Delhi Route Planner over Android 2.2 2012

Advantages of ANDROID1. The ability for anyone to customize the Google Android platform will open up theapplications playing field to small and new players who lack the financial muscle to negotiatewith wireless carriers like AT&T and Orange. The consumer will benefit from having a widerange of mobile applications to choose from since the monopoly will be broken by GoogleAndroid.2. Although this will depend on the carrier, one will be able to customize a mobile phonesusing Google Android platform like never before, right down to the screen. Features like weatherdetails, opening screen, live RSS feeds and even the icons on the opening screen will be able tobe customized.3. In addition, as a result of many mobile phones carrying Google Android, companies willcome up with such innovative products like the location– aware services that will provide userswith any information they might be in need of. This information could include knowing thelocation of a nearby convenience store or filling station. In addition the entertainmentfunctionalities will be taken a notch higher by Google Android being able to offer online real

time multiplayer games.

 Application behaviorEvery application in Android runs as a separate process with a unique UID, unlike adesktop computer where all the applications run with the same UID. The UID of an applicationin Android protects its data. Programs cannot typically read or write each other’s data, andsharing between applications must be done explicitly [3]. Due to this feature, a compromise suchas a buffer overflow attack [3,17] is restricted to the application and its data. However, it isimportant to note that an application can launch another program that will run with the launchingapplication’s UID.5For a developer to run an application on the Android phone, his or her application needsto be signed. Developers can generate self-signed certificates and use this for code signing. Codesigning is done to enable developers to update their own applications without creatingcomplicated interfaces and permissions. Application componentsApplications are comprised of components. Components interact using Intent messages[6]. Recipient components assert their desire to receive Intent messages by defining Intent filters[6]. There are four types of components used to construct applications:1. Activity components interact with the user via the touchscreen and keypad. Only oneactivity is active at a time, and processing is suspended for all other activities [5].2. Service components provide for background processing when an application’sactivity leaves focus and another GUI application comes in the foreground [6].3. Broadcast receiver components provide a general mechanism for asynchronous eventnotifications [6]. The receivers receive Intent messages that are implicitly addressedwith action strings; for instance, dialing a number is associated with the actionOUTGOING_CALL_ACTION.4. Content provider components are the preferred method for sharing data betweenapplications [5]. These APIs implement an SQL-like interface; however, the backendimplementation is up to the application developer.

28

Delhi Route Planner over Android 2.2 2012

Application level security frameworkApplications need approval to do things their user might object to, such as sending SMSmessages, using the contacts database, or using the camera. To keep track of what the applicationis permitted to do, Android maintains manifest permissions that are enforced by the middlewarereference monitor. The permission label is a unique text string that can be defined by the OS aswell as by a third-party developer. These permissions indicate what resources and interfaces areavailable to the application at run-time. An example of a permission is READ_CONTACTS,which permits the application to read the user’s address book. In addition to reading and writingdata, permissions allow applications to access system services such as dialing a number withoutprompting the user or taking complete control of the screen and obscuring the status bar.A developer should specify all permissions that his or her application requires in theAndroidManifest.xml file; however, it is not necessary that all permissions be granted. When theapplication is getting installed, the user has the choice to decide whether or not to trust thesoftware based on the application’s promised features. and the permissions required. Thesepermissions are different from file permissions. Once an application is installed, its permissions7cannot be changed. The fewer permissions an application needs, the more comfortable the usershould feel installing the application.Permissions have a protection level. The four protection levels are outlined in Table 1.Table 1. Android manifest permission protection levels [2]NormalPermissions for application features with minor consequences suchas VIBRATE, which lets applications vibrate the device. Suitable forgranting rights not generally of keen interest to users; users canreview but may not be explicitly warned.DangerousPermissions such as WRITE_SETTINGS or SEND_SMS aredangerous as they could be used to reconfigure the device or incurtolls. This level marks permissions in which the users will beinterested or be potentially surprised. Android will warn users aboutthe need for these permissions on install.SignatureThese permissions can be granted only to other applications signedwith the same key as this program. This allows secure coordinationwithout publishing a public interface.SignatureOrSystemSame as Signature except that programs on the system image alsoqualify for access. This allows programs on custom Android systemsto also get the permission. This protection is to help integrate systembuilds and won’t be typically used by developers.The permission label policy is used to protect applications from each other and alsovarious components within an application. In the mobile phone environment, it is difficult for theoperating system to manage access control policies of hundreds of unknown applications.Therefore, Android simplifies this by having the developers define their permission labels toaccess their interfaces. By doing so, the developer does not need to know about existing andfuture applications; permission labels allow the developer to indirectly influence securitydecisions.8 Files and preferencesAndroid uses UNIX-style file permissions [2]. Each application has its own area on the

29

Delhi Route Planner over Android 2.2 2012

file system that it owns [2,16]. This is similar to programs having a home directory to go alongwith their User IDs. This feature is limited only to the internal phone memory and not theexternal memory. The standard way for applications to expose their private data to otherapplications is through content providers [16].Android limitationThe current security policy of Android works on a static level only during installation toidentify whether the application is permitted all the requested permissions from the user. Oncethe permission is granted, there is no way to govern to whom these rights are given or how theyare later exercised [3]. Permissions are asserted as vague suggestions as to what kinds ofprotections the application desires. One must place good faith in the user and the OS to makegood choices about permissions granted to the application which, in many cases, may not be theabsolute best choice.Due to the above architecture, Android system libraries have limited ability to controlinstalled third-party applications that can be granted permissions to use their interfaces. Thisimplies that there is no control to restrict an installed application based on its signatures. Further,it is not possible to define the desirable configurations of an installed third-party application suchas the minimum version and the set of permissions it is allowed or disallowed.This implies that Android applications built with the right set of permissions protect thesystem from malicious applications but provides severely limited infrastructure for applicationsto protect themselves.

About JAVA

History of JAVAJava is a programming language originally developed by James Gosling at SunMicrosystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a corecomponent of Sun Microsystems' Java platform. The language derives much ofits syntax from Cand C++ but has a simpler object model and fewer low-level facilities. Javaapplications are typically compiled to bytecode (class file) that can run on any Java VirtualMachine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent,class-based, object-oriented language that is specifically designed to have as few implementationdependencies as possible. It is intended to let application developers "write once, run anywhere".Java is currently one of the most popular programming languages in use, and is widely usedfrom application software to web applications.[9][10]The original and reference implementation Java compilers, virtual machines, and classlibraries were developed by Sun from 1995. As of May 2007, in compliance with thespecifications of the Java Community Process, Sun relicensed most of its Java technologiesunder the GNU General Public License. Others have also developed alternative implementations

30

Delhi Route Planner over Android 2.2 2012

of these Sun technologies, such as the GNU Compiler for Java, GNU Classpath, and

Dalvik.

Overview of JAVA

Java is an object-oriented programming language . Java applications are typicallycompiled to bytecode, although compilation to native machine code is also possible. At runtime,bytecode is usually either interpreted or compiled to native code for execution, although directhardware execution of bytecode by a Java processor is also possible. Sun Microsystems providesa GNU General Public License implementation of a Java compiler and Java virtual machine, incompliance with the specifications of the Java Community Process. Java is the only one pureobject oriented language available today, is now used in almost all applications, from simplehome appliances control systems to complex space control systems. Java’s motto is write once,run anywhere. Java’s latest version includes new features that enrich and extend the javaplatform and provides upward compatibility and improved performance. The most strikingfeature of the language is that it is a platform-neural language. Java is the first programminglanguage that is not tied to any particular hardware or operating system. Some of the java

features are given below.

1. Compiled and interpreted2. Platform independent and portable3. Object oriented4. Robust and secure5. Distributed6. Familiar, simple and small7. Multithreaded and interactive8. High performance9. Dynamic and extensible

Object Oriented:- Java uses object-oriented concept as for basic for softwaredesign. Java provides object a clean and efficient object based development platform.

Robust:- The multi-platform environment of the web places high demand on thereliability of the program to execute on a Varity of systems. Thus high priority has been given tocreate robust and highly reliable programmers in the design of java.

31

Delhi Route Planner over Android 2.2 2012

Secure:- Prior to Java, most users did not download executable programsfrequently, and those who did scanned them for viruses prior to execution. Even so, most usersstill worried about the possibility of infecting their systems with a virus. In addition to viruses,another type of malicious program exists that must be guarded against. This type of program cangather private information, such as credit card numbers, bank account balances, and passwords,by searching the contents of your computer's local file system. Java answers both of theseconcerns by providing a "firewall" between a networked application and the computer.When one uses a Java-compatible Web browser, one can safely download Javaapplets without fear of viral infection or malicious intent. Java achieves this protection byconfining a Java program to the Java execution environment and not allowing it to access otherparts of the computer. The ability to download applets with the confidence that no harm will bedone and that no security will be breached is considered by many to be the single most importantaspect of Java.

Architecture Natural:- Java was designed to support application on heterogeneousnetwork environments composed of Varity of processors and the operating system architectureand multiple programming interface. To enable java application to execute anywhere on thenetwork, the java compiler generates the byte code instruction which are not dependent uponparticular computer architecture. These instructions are then interpreted on any machine andtranslated on the native machine code on the fly by the java run time system.

Portable:- The Java programs are same on any platform. There are no data typeincompatibilities across the hardware and software architectures.

Interpreted:- Java byte code is not directly executed by the system, because java isinterpreted. The speed is more than adequate for most interactive application. The speed willcontinue to improve further.

Multithreaded:- Java was designed to meet the real world requirement of creative,interactive, networked programs. Java’s multithreading capability provider’s the means to buildapplication with many concurrent threads of activity. The multithreading feature of java asvarious sophisticated synchronization primitives. Moreover, the java’s high level systemlibraries have been written to be threading safe.

Dynamic:- Java complier is strict in its static checking during compiles time, thelanguage and run time system are dynamic during linking and loading stages. Classes are linkedonly as needed. New code modules can be linked in on demand from a variety of course, evenfrom the network in a number.

High performance:- Java enables the creation of cross-platform programs bycompiling into an intermediate representation called java byte code. This code can be interpretedon any system that provides a java a virtual machine. The java byte code was carefully designedso that it would to be easy to translate directly into native machine code for very highperformance by using a just-in-time complier.

Distributed:- Java is distributed environment of the Internet and it handles TCP/IPprotocol. Java included features for intra-address-space messaging. That allowed object toexecute procedure remotely. Java revived these interface in a package called remote methodinvocation. This feature brings an unparalleled level of abstraction to client/server programming.

32

Delhi Route Planner over Android 2.2 2012

Security Features in JavaThe security features provided by the Java Development Kit (JDK™) are intended for a varietyof audiences:Users running programs:- Built-in security functionality protects you frommalevolent programs (including viruses), maintains the privacy of your filesand information about you, and authenticates the identity of each codeprovider. You can subject applications and applets to security controls whenyou need to.Developers:- You can use API methods to incorporate security functionalityinto your programs, including cryptography services and security checks. TheAPI framework enables you to define and integrate your own permissions(controlling access to specific resources), cryptography serviceimplementations, security manager implementations, and policyimplementations. In addition, classes are provided for management of yourpublic/private key pairs and public key certificates from people you trust.Systems administrators, developers, and users:- JDK tools manage yourkeystore (database of keys and certificates); generate digital signatures forJAR files, and verify the authenticity of such signatures and the integrity of thesigned contents; and create and modify the policy files that define yourinstallation's security policy.The GUI is designed in Java using swing components. Swing components provideGUI environment to Java. Swing components are a collection of lightweight visual components

that provide a replacement

Overview of ECLIPSE

Eclipse Enterprise Workbench is a full-featured, Enterprise class platform and tool suite fordeveloping software applications and systems supporting the full life-cycle of applicationdevelopment. Facilities and features usually found only in high-priced, Enterprise class productare included in Eclipse. Based on the open industry standards and the Eclipse platform, Eclipseredefines software pricing, support and delivery release cycles by providing a completeapplications development environment for J2EE WEB, XML, UML and databases and the mostcomprehensive array of application server connectors(25 target environments) to optimizedevelopment, testing and portability.The Android platform is a software stack for mobile devices. In this two-part screencast you aregoing to see how to install and use the Android SDK to develop a simple Android applicationusing the Java programming language and Eclipse IDE plugin. The first screencast shows how toinstall SDK, configure the Eclipse plugin and run sample Android applications. Total runningtime 03:00 minutesThe second tutorial covers new project creation in Eclipse, the use ofAndroid emulator, content model, permissions and navigation model. Total running time 02:50minutes.Most people know Eclipse as an integrated development environment (IDE) forJava. Eclipse is created by an open source community and is used in several different areas, e.g.

33

Delhi Route Planner over Android 2.2 2012

as IDE for Java or for Android or as a platform to develop Eclipse RCP applications, etc.. Theusage of Eclipse as a Java development environment will be described in this tutorial. Startingout with the right Eclipse package will smooth your transition from either j2me novice toAndroid application developer or from java newbie to Android application developer novice.Thus, it is described what Eclipse package one should start with in their Android applicationdevelopment. You can find the author's blog at Mobilebytes . While it is true that the beginningAndroid application developer may use the Eclipse ADT plugins at some point, he or sheprogresses beyond that to use heap dumps and profile dumps to optimize code. Whereas EclipseMAT (Memory Analyzer Technology) provides one the ability to read the heap dump once it isconverted with a converter contained in the Android SDK and the Eclipse TPTP project allowsus to analyze the profiing data once it is converted using the converter from the Android SDK.Thus, which Eclipse package should one download to start out with that will enable one to

progress to these processes once Android application development is mastered

PROBLEM EVALUATION AND SYNTHESIS

In the problem evaluation and synthesis the software engineer must define allexternally observable data objects, evaluate the flow and content of information, define andelaborate all software functions, understand software behaviour that affects the system, establishsystem interface characteristics, and uncover additional design constraints. Each of these tasksserves to describe the problem so that an overall solution may be synthesized.The Proposed system has been developed for the present requirements, which isadvantageous over the existing system. Here radio can be listen online, which are completelyinternet based is and the proposed system is highly user friendly.Since the proposed system having number of stations so user will like thisapplication.

MODELING

During software requirements analysis, we create models of it to be built to gain betterunderstanding of the actual logical entities (functions and sub functions) to be built. Thefollowing are the roles of models in requirements analysis.The model helps analyst to understand information, function, and behavior of thesystem.The model becomes the main reference for review to determine completeness,consistency and accuracy of the specification.The model becomes the foundation for design.

FEASIBILITY STUDYThe feasibility of a project can be ascertained in terms of technical factors,economic factors, or both. A feasibility study is documented with a report showing all theramifications of the project. In project finance, the pre-financing work (sometimes referred to asdue diligence) is to make sure there is no "dry rot" in the project and to identify project risksensuring they can be mitigated and managed in addition to ascertaining "debt service" capabilityFeasibility is a measure of how beneficial the development of the information system will be toan organization. This is done by investigating the existing system proposal according to its

34

Delhi Route Planner over Android 2.2 2012

workability, impact on the organization, ability to meet user needs, and effective use ofresources.Few key considerations are involved in the feasibility analysis: economic, technical and socialetc..

Economic Feasibility:Economic analysis is the most frequently used method for evaluating theeffectiveness of a proposed system. It is more commonly known as cost benefit analysis, theprocedure to determine the benefits and saving that are expected from a decision is made todoing and implement the system. Otherwise make alterations in the proposed system.Cost associated with the development of computer-based systems is as follows.1. Procurement costs such as consultation, equipment purchase, installation,furnishing the size etc.2. Start-up costs, user operating system cost, personal search cost etc. Projectrelatedcosts such as software purchase, training personnel, data collection, documentspreparation costs etc.3. Ongoing costs such as hardware, software maintenance, rental, depreciation ofhardware costs etc.

Technical Feasibility:In examining Technical feasibility of the system, ore importance is given to thehardware interaction part of the system. The assessments of technical feasibility centers on theexisting system and to what extent it can support the proposed addition. This was based on anoutline design of system requirements in turns of inputs, files programs, procedures and staff. Itinvolves financial considerations to accommodate technical enhancements. The propose systemhas three-tier architecture consisting of SQLite as the database, Application Server as SQLite asthe middle tier and Internet developer suite oracle as the development tool. The software is veryuser friendly for both developers and end users.

Social feasibility:People are inherently resistant to change and mobiles have been known tofacilitate change. An estimate should be made about the reaction of the user staff towards thedevelopment of a computerized system. Computer installations have something to do withturnover, transfers and changes in job status. The introduction of a candidate system requiresspecial effort to educate, sell and train the staff for conducting the business.The proposed software is designed such that only persons can access it havingandroid mobile and a person with some computer knowledge can interact with the system freely.Computer illiterate people require training for efficient use of the software.

Managerial Feasibility:Managerial feasibility involves the capability of the infrastructure of a process toachieve and sustain process improvement. Management support, employee involvement, andcommitment are key elements required to ascertain managerial feasibility.

Economic Feasibility:This involves the feasibility of the proposed project to generate economicbenefits. A benefit-cost analysis and a breakeven analysis are important aspects of evaluatingthe economic feasibility of new industrial projects. The tangible and intangible aspects of aproject should be translated into economic terms to facilitate a consistent basis for evaluation.

35

Delhi Route Planner over Android 2.2 2012

Financial Feasibility:Financial feasibility should be distinguished from economic feasibility.Financial feasibility involves the capability of the project organization to raise the appropriatefunds needed to implement the proposed project. Project financing can be a major obstacle inlarge multi-party projects because of the level of capital required. Loan availability, creditworthiness, equity, and loan schedule are important aspects of financial feasibility analysis.

Cultural Feasibility:Cultural feasibility deals with the compatibility of the proposed project with thecultural setup of the project environment. In labor-intensive projects, planned functions must beintegrated with the local cultural practices and beliefs. For example, every one using mobile soit is cultural feasible.

Safety Feasibility:Safety feasibility is another important aspect that should be considered in projectplanning. Safety feasibility refers to an analysis of whether the project is capable of beingimplemented and operated safely with minimal adverse effects on the environment.Unfortunately, environmental impact assessment is often not adequately addressed in complexprojects. As an example, the North American Free Trade Agreement (NAFTA) between theU.S., Canada, and Mexico was temporarily suspended in 1993 because of the legal considerationof the potential environmental impacts of the projects to be undertaken under the agreement.

Political Feasibility:A politically feasible project may be referred to as a "politically correct project."Political considerations often dictate direction for a proposed project. This is particularly truefor large projects with national visibility that may have significant government inputs andpolitical implications. For example, political necessity may be a source of support for a projectregardless of the project's merits. On the other hand, worthy projects may face insurmountableopposition simply because of political factors. Political feasibility analysis requires anevaluation of the compatibility of project goals with the prevailing goals of the political system.

Environmental Feasibility:Often a killer of projects through long, drawn-out approval processes andoutright active opposition by those claiming environmental concerns. This is an aspect worthyof real attention in the very early stages of a project. Concern must be shown and action must betaken to address any and all environmental concerns raised or anticipated. A perfect examplewas the recent attempt by Disney to build a theme park in Virginia. After a lot of funds andefforts, Disney could not overcome the local opposition to the environmental impact that theDisney project would have on the historic Manassas battleground area.

Market Feasibility. Another concern is market variability and impact on the project. This areashould not be confused with the Economic Feasibility. The market needs analysis to view thepotential impacts of market demand, competitive activities, etc. and "divertible" market shareavailable. Price war activities by competitors, whether local, regional, national or international,must also be analyzed for early contingency funding and debt service negotiations during thestart-up, ramp-up, and commercial start-up phases of the project.

Feasibility Areas

36

Delhi Route Planner over Android 2.2 2012

The Feasibility Study is the preliminary study that determines whether a proposedsystems project is technically, financially, and operationally viable. The Alternatives Analysis,usually included as part of the Feasibility Study, identifies viable alternatives for the systemdesign and development. Between them, the documents provide: An analysis of the systemobjectives, functional requirements, and system design concepts;

A determination of the feasibility of applying automated systems to effectively,efficiently, and economically improve program operations;An evaluation of alternative approaches for reasonably achieving the objectives andgoals; andIdentification of a proposed approach.

Scope of Feasibility AnalysisIn general terms, the elements of a feasibility analysis for a project should cover the following:

Need Analysis. This indicates recognition of a need for the project. The need mayaffect the organization itself, another organization, the public, or the government. Apreliminary study is then conducted to confirm and evaluate the need. A proposal of howthe need may be satisfied is then made. Pertinent questions that should be asked include:Is the need significant enough to justify the proposed project?Will the need still exist by the time the project is completed?What are the alternate means of satisfying the need?What are the economic, social, environmental, and political impacts of the need?

Process Work. This is the preliminary analysis done to determine what will be requiredto satisfy the need. The work may be performed by a consultant who is an expert in theproject field. The preliminary study often involves system models or prototypes. Fortechnology-oriented projects, artist's conception and scaled-down models may be usedfor illustrating the general characteristics of a process. A simulation of the proposedsystem can be carried out to predict the outcome before the actual project starts.

Engineering & Design. This involves a detailed technical study of te proposed project.Written quotations are obtained from suppliers and subcontractors as needed.Technology capabilities are evaluated as needed. Product design, if needed, should bedone at this time.

Cost Estimate. This involves estimating project cost to an acceptable level of accuracy.Levels of around -5% to +15% are common at this level of a project plan. Both theinitial and operating costs are included in the cost estimation. Estimates of capitalinvestment and of recurring and nonrecurring costs should also be contained in the costestimate document. Sensitivity analysis can be carried out on the estimated cost values tosee how sensitive the project plan is to the estimated cost values.

Financial Analysis. This involves an analysis of the cash flow profile of the project. Theanalysis should consider rates of return, inflation, sources of capital, payback periods,breakeven point, residual values, and sensitivity. This is a critical analysis since itdetermines whether or not and when funds will be available to the project. The projectcash profile helps to support the economic and financial feasibility of the project.

37

Delhi Route Planner over Android 2.2 2012

Project Impacts. This portion of the feasibility study provides an assessment of theimpact of the proposed project. Environmental, social, cultural, political, and economicimpacts may be some of the factors that will determine how a project is perceived by thepublic. The value added potential of the project should also be assessed. A value addedtax may be assessed based on the price of a product and the cost of the raw material usedin making the product. The tax so collected may be viewed as a contribution togovernment coffers.

Conclusions and Recommendations. The feasibility study should end with the overalloutcome of the project analysis. This may indicate an endorsement or disapproval of theproject. Recommendations on what should be done should be included in this section ofthe feasibility report.SOFTWARE REQUIREMENTSPECIFICATION

REQUIREMENT SPECIFICATIONAn accurate and thorough understanding of system requirements is essential tothe success of any Software Development Process. All further stages of SDLC like systemanalysis, design and coding depend on how accurate well prepared and thoroughly understoodthe System Requirements Specification is. Poorly analyzed requirements will disappoint theuser no matter how well designed and the well coded the software is.Requirement specification appears to be a relatively simple task but the chancesof misinterpretation is very high, ambiguity is probable and communication gap betweencustomer and developer is bound to bring confusions. Requirement Specifications begin with aclear and concise heading stating in a sentence the task to be performed (i.e. work objective). Forthis, we have to identify the problem first. Problem specifications serve as the basis foridentifying work objective that helps in describing the requirements in technical and precisestatements. After the initial specification reports are received, they are analyzed and refinedthrough customer-developer interaction. System Analysis follows to determine feasibility andCost Benefit Analysis.A complete understanding of requirement specification of the new system is veryimportant for the successful development of the software product. Requirement specification isthe foundation in the process of software development. All further development like SystemAnalysis, System Design, and Coding will depend on how accurate and well prepared therequirement.

Overall DescriptionRequirement specification appears to be relatively simple task, but appearancesare often deceiving. There is always a chance of wrong specification because of communicationgap between user and developer, ambiguity in requirement or a wrongly specified problem.Requirement Specification begins with a clear statement of the problem and the task to beperformed. Then requirements are described in a technical manner in precise statements. Afterthe initial specification reports are received, they are analyzed and refined through userdeveloper interaction. System Analysis follows to determine and cost benefit analysis.An SRS is basically an organization's understanding (in writing) of a customer or potentialclient's system requirements and dependencies at a particular point in time (usually) prior to anyactual design or development work. It's a two-way insurance policy that assures that both the

38

Delhi Route Planner over Android 2.2 2012

client and the organization understand the other's requirements from that perspective atThe SRS document itself states in precise and explicit language those functionsand capabilities a software system (i.e., a software application, an ecommerce Web site, and soon) must provide, as well as states any required constraints by which the system must abide. TheSRS also functions as a blueprint for completing a project with as little cost growth as possible.The SRS is often referred to as the "parent" document because all subsequent projectmanagement documents, such as design specifications, statements of work, software architecturespecifications, testing and validation plans, and documentation plans, are related to it.It's important to note that an SRS contains functional and nonfunctional requirementsonly; it doesn't offer design suggestions, possible solutions to technology or business issues, orany other information other than what the development team understands the customer's system

requirements to be. It consists following phases.

THE IMPORTANCE OF ANDROID DEVELOPERS IN INDIA

Mobile phone with handy features was the trend some years back. But it has beenovertaken by a new range of platform called the Google android phones. Smart mobileswith android platform are on high-rise in the present scenario. It is doing a steadybusiness to compete the apple ranges. Apple’s iPhone, pads and tablets are based onapple OS, which it supports only apple based hardware. The android smart phones aretruly helpful with open source platform and support all kinds of hardware. Thus it wasable to create its mark with occupying almost 50 percentage of the mobile market.Android gadgets have created a revolution, just like shifting to internet and websites forgaining knowledge. As it is handy and compatible, it is used wherever needed. Itsapplications are truly simple, which people with basic operating knowledge of mobilephone or computer could handle easily. Android developers in India offer the best ofservices and applications in different areas. It includes maintenance and upgrade,business, entertainment, games, multimedia, weather updates, etc. Each of thedevelopers is hired from the leading engineering colleges in the country. They are givencomplete training andassistance to handle all latest techniques and methodologies. Everycomplex development project is handled at ease by the team of these skilleddevelopers.

39

Delhi Route Planner over Android 2.2 2012

Android developers in India frame the main role in the application developmentprocess. Due to the rapid growth of such advanced platform, they are on high need. Withefficient professional experience and creativity, they can prove their talent giving bestoutput. The growth of mobile business has led to the demand of developers. They arehired by part-time, full-time or on project basis. Apart from these, there are also freelancedevelopers working to give the best applications. Android engineers with efficient skillsholds a great range of opportunities, where they could develop applications as well dotheir role in mobile websites. They offer services at affordable rates with excellentcustomer support and assistance. These skilled professionals working on project basis,stay connected to their clients reporting regular updates. The client can select upon dailyor weekly updates in par to the project. Moreover, the client holds the opportunity toselect their team members, which they prefer to offer the project. There are severaladvantages from the client side, as they could gain more details when working with theseexperts. They can also find solutions to other software related problems.Therefore, it is considered quite flexible to Hire Android Developers. They areconnected with just submitting the quote form present in their website. Moreover, there is24 hours customers support and assistance offered, while ready to present completesolutions for all software queries. Their services are very much affordable, which everysmall to big client could make complete use. To make any dream applications into reality,it is best to hire and make the apps, one of the most sorted apps in the world. It is all

possible with just a click of their website.

User interface

Layout in XML<LinearLayout android:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@string/name_title"style="@style/label" /><EditText android:id="@+id/name"android:layout_width="fill_parent"android:layout_height="wrap_content"android:hint="@string/initial_text"style="@style/editable_text"><requestFocus /></EditText></LinearLayout>

40

Delhi Route Planner over Android 2.2 2012

ActivityController of a screenpublic class ContextEditorActivity extends Activity {private EditText nameWidget;protected void onCreate(Bundle savedValues) {super.onCreate(savedValues);setContentView(R.layout.context_editor);nameWidget = (EditText) findViewById(R.id.name);}}Connect Activity to XML layoutBinding via id of view component: android:id=”@+id/name”, use findViewByIdEclipse plugin generates R class with layout and other resources, id'sadvantage: auto-completion

Demo Eclipse• View XML• Preview layout, locale, portrait/landscape, screen sizeButtons - context editorSave buttonsaveButton = (Button) findViewById(R.id.save_button);saveButton.setOnClickListener(new View.OnClickListener() {@Overridepublic void onClick(View v) {finish();}});• Bind save button• Listener onClick – user clicks on button• Activity finish() - back to previous screen

NavigationNavigation through application, finish() in Context edit navigates back to Context list.Go to next Activity:Intent intent = new Intent(androidContext,ContextEditor.class);startActivity(intent);Receive phone callWhen you receive phone call: onPause() and after call: onResume()Low on memoryLow on memory: onPause() and process is killedChange orientationPortrait/landscapeActivity on foreground – onPause(), onStop(), onDestroy()Change layout – onCreate(), onStart(), onResume()Practical data retrieve/saveWhen your application gets killed because of low memory and you want to save the data of

41

Delhi Route Planner over Android 2.2 2012

user, you can do this in onPause(), in normal data save or maybe in temporary spacesomewhere and recover later. This is also useful in other situations, like back button.Simple solution:onCreate(): retrieveonPause(): save

UILayout widgets● AbsoluteLayout – x/y coordinates, inflexible● LinearLayout – horizontal/vertical, simple, flexible● RelativeLayout – position relative to other components, flexible, more complex● TableLayout – rows/columnsView components:ListButtonText view/editSpinnerGoogle map, and more...NavigationWith parametersBundle bundle = new Bundle();bundle.putString("myparameter", "Hello world");intent.putExtras(bundle);You can use Parcelable interface to add other classes to bundle.Get results backprivate static final int EDIT_ITEM = 2;...startActivityForResult(intent, EDIT_ITEM);onPause()onCreate()Retrieve data Save dataAfter Activity2 is finished, Activity1 gets back:protected void onActivityResult(int requestCode, int resultCode, Intentdata) {switch (requestCode) {case NEW_ITEM:if (resultCode == Activity.RESULT_OK) {if (data != null) {Uri uri = data.getData();itemIdToSelect = ContentUris.parseId(uri);}}// ...Using a URI:Uri itemUri = Uri.parse("content://nextaction/task/1");Intent intent = new Intent(Intent.ACTION_VIEW, itemUri);startActivity(intent);Target Activity receives:public void onCreate(Bundle savedData) {

42

Delhi Route Planner over Android 2.2 2012

Uri contextUri = getIntent().getData();To other applicationIntent intent = new Intent(Intent.ACTION_PICK,Uri.parse("content://contacts/people"));startActivityForResult(intent, CHOOSE_CONTACT);protected void onActivityResult(int requestCode, int resultCode, Intentdata) {// data.getDate() == "content://contacts/people/2"}Activity1 Activity2IntentIntent

AndroidManifest.xmlMatch with URI<activity android:name=".task.TaskViewActivity"android:label="@string/action_title"><intent-filter><action android:name="android.intent.action.VIEW"/><category android:name="android.intent.category.DEFAULT"/><data android:scheme="content" android:pathPrefix="nextaction/task"/></intent-filter></activity>Start Activity<activity android:name=".toplevel.activity.TopLevelActivity"android:label="@string/app_name"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity>

Data StorageFilesInternal:File file = new File(fileName);FileOutputStream output = null;try {output = new FileOutputStream(file);} finally {if (output != null) {try { output.close(); } catch (IOException e) {}}}SD Card:File file = new File(Environment.getExternalStorageDirectory(),fileName);Preferences

43

Delhi Route Planner over Android 2.2 2012

ReadingSharedPreferences settings = getSharedPreferences("MyPrefsFile", MODE_PRIVATE);String userName = settings.getString("userName", "defaultUser");WritingSharedPreferences settings = getSharedPreferences("MyPrefsFile", MODE_PRIVATE);SharedPreferences.Editor editor = settings.edit();editor.putString("userName", userName);editor.commit();

SQLiteExecute SQL directlySQLiteDatabase db = ...db.execSQL("CREATE TABLE context ("+ "_id INTEGER PRIMARY KEY,"+ "name TEXT"+ ");");Querypublic Cursor query (SQLiteDatabase db,String[] projectionIn, // selected fieldsString selection, String[] selectionArgs, // where clause and valuesString groupBy, String having, String sortOrder)ExampleSQLiteQueryBuilder contextQuery = new SQLiteQueryBuilder();contextQuery.setTables("context");contextQuery.setProjectionMap(CONTEXT_PROJECT_MAP);Cursor cursor = contextQuery.query(db, new String[] {Task.ID},Task.NAME + " = ?",new String[] {contextName}, null, null, null);CONTEXT_PROJECT_MAP = new HashMap<String, String>();CONTEXT_PROJECT_MAP.put(GtdContext.ID,DatabaseHelper.TABLE_CONTEXT + "._id");CONTEXT_PROJECT_MAP.put(GtdContext.NAME,DatabaseHelper.TABLE_CONTEXT + ".name");SQL: context.name as nameif (cursor.moveToFirst()) {String name = cursor.getString(columnIndex);}Updatepublic int update (String table,ContentValues values, // map of update valuesString whereClause,String[] whereArgs)ExampleContentValues values = new ContentValues();values.put(GtdContext.Column.NAME, newName);db.update(DatabaseHelper.TABLE_CONTEXT, values,

44

Delhi Route Planner over Android 2.2 2012

GtdContext.ID + " = ?", new String[] {Integer.toString(contextId)});ContentProviderStandard interface for retrieving/storing data.public class GtdProvider extends ContentProvider {...} In AndroidManifest.xml<provider android:name=".database.GtdProvider"android:authorities="net.kazed.android.gtd.database.GtdAndroid"/>Querypublic abstract Cursor query (Uri uri, // ID of item or itemsString[] projection, // selected fieldsString selection, String[] selectionArgs, // where clause and valuesString sortOrder)Insertpublic abstract Uri insert (Uri uri, ContentValues values)Updatepublic abstract int update (Uri uri, ContentValues values, Stringselection, String[] selectionArgs)Deletepublic abstract int delete (Uri uri, String selection, String[]selectionArgs)Examplepublic static final Uri CONTENT_URI =Uri.parse("content://net.kazed.android.gtd.database.GtdAndroid/context");Uri itemUri = ContentUris.withAppendedId(GtdContext.CONTENT_URI, id);Cursor cursor = getContentResolver.query(itemUri,new String[] {ID, NAME}, null, null, null);Implement ContentProviderQuerypublic Cursor query(Uri uri, String[] projection, String selection,String[] selectionArgs, String sort) {Cursor cursor = null;SQLiteQueryBuilder qb = new SQLiteQueryBuilder();SQLiteDatabase db = dbHelper.getReadableDatabase();switch (URI_MATCHER.match(uri)) {case CONTEXT_ID:qb.setTables(DatabaseHelper.TABLE_CONTEXT);qb.appendWhere("_id=" + uri.getPathSegments().get(1));cursor = qb.query(db, projection, selection, selectionArgs,null, null, "name DESC");break;// ...return cursor;}Setup URI matcherpublic static final String PACKAGE ="net.kazed.android.gtd.database.GtdAndroid";static {URI_MATCHER = new UriMatcher(UriMatcher.NO_MATCH);

45

Delhi Route Planner over Android 2.2 2012

URI_MATCHER.addURI(PACKAGE, "context", CONTEXTS);URI_MATCHER.addURI(PACKAGE, "context/#", CONTEXT_ID);// ...}Implement insert, update, deletepublic Uri insert (Uri uri, ContentValues values)public int update (Uri uri, ContentValues values, String selection,String[] selectionArgs)public int delete (Uri uri, String selection, String[] selectionArgs)Mime type/URI mappingpublic static final String CONTENT_ITEM_TYPE ="vnd.android.cursor.item/vnd.nextaction.context";public String getType(Uri uri) {String type = null;switch (URI_MATCHER.match(uri)) {case CONTEXTS:type = GtdContext.CONTENT_TYPE;break;// ...}return type;}Navigation with mime typeUri itemUri = Uri.parse("content://net.kazed.android.gtd.database.GtdAndroid/context/1");Intent intent = new Intent(Intent.ACTION_VIEW, itemUri);startActivity(intent);Android manifest<activity android:name=".context.activity.ContextEditorActivity"android:label="@string/title_context"><intent-filter><action android:name="android.intent.action.EDIT" /><category android:name="android.intent.category.DEFAULT" /><data android:mimeType="vnd.android.cursor.item/vnd.nextaction.context"/></intent-filter></activity>

46

Delhi Route Planner over Android 2.2 2012

Notification

Toast popupToast toast = Toast.makeText(this,R.string.backup_import_failure, Toast.LENGTH_LONG);toast.show();

47

Delhi Route Planner over Android 2.2 2012

Notification bar

NotificationManager notificationManager = (NotificationManager)context.getSystemService(Service.NOTIFICATION_SERVICE);Resources resources = context.getResources();Notification notification = new Notification(

48

Delhi Route Planner over Android 2.2 2012

android.R.drawable.ic_menu_info_details,"Hello", System.currentTimeMillis());Intent applicationIntent = new Intent(context, StartedTasksActivity.class);PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,applicationIntent, 0);notification.setLatestEventInfo(context, "Title","Notification text", pendingIntent);notificationManager.notify(NOTIFICATION_ID, notification);Other notification:● Blinking LED's● Ringtone● Vibration

Background processAlarmAlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);Intent processIntent = new Intent(context, StartDateProcessor.class);PendingIntent alarmIntent = PendingIntent.getBroadcast(context, 0,processIntent, 0);Date wakeupTime = // ...alarmManager.set(AlarmManager.RTC_WAKEUP, wakeupTime, alarmIntent);BroadcastReceiverpublic class StartDateProcessor extends BroadcastReceiver {public void onReceive(Context context, Intent intent) {}}

Send broadcastIntent intent = new Intent("net.kazed.nextaction.NEW_TASK");intent.putExtra("taskId", taskId);sendBroadcast(intent);Register in manifest:<receiver android:name=".process.TaskProcessor"><intent-filter><action android:name="net.kazed.nextaction.NEW_TASK"/></intent-filter></receiver>Servicepublic class MyService extends Service {public void onCreate() {super.onCreate();}public IBinder onBind(Intent intent) {return null;}

49

Delhi Route Planner over Android 2.2 2012

public void onStart(Intent intent, int startId) {super.onStart(intent, startId);}}

Register serviceManifest:<service android:name=".app.LocalService"/>

Phone featuresCameraCamera camera = Camera.open();ShutterCallback shutterCallback = new ShutterCallback() {public void onShutter() {}};PictureCallback rawCallback = new PictureCallback() {public void onPictureTaken(byte[] data, Camera camera) {}};PictureCallback jpegCallback = new PictureCallback() {public void onPictureTaken(byte[] data, Camera camera) {}};camera.takePicture(shutterCallback, rawCallback, jpegCallback);

GPSLocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);Criteria criteria = new Criteria();criteria.setAccuracy(Criteria.ACCURACY_COARSE);boolean enabledOnly = true;String providerName = locationManager.getBestProvider(criteria, enabledOnly);Location location = locationManager.getLastKnownLocation(providerName);

Tilt sensorsSensorManager sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE);SensorListener listener = new SensorListener() {public void onAccuracyChanged(int sensor, int accuracy) {}public void onSensorChanged(int sensor, float[] values) {}};sensorManager.registerListener(listener, SensorManager.SENSOR_ACCELEROMETER);

50

Delhi Route Planner over Android 2.2 2012

TestingDependency injection• Used in modern frameworks (Spring, Guice, EJB, JSF)• Possible on Android? Discussion in developer google group• DI is "heavy weight"• costs too much performance and/or memory• Android provides integration test: run on emulator

Java libraries• not: bytecode generators (cglib)• XML parsing• xstream: easy write and read, somewhat large for small app• SAX parser: small and lightweight

PerformanceAvoid newPrefer static helper methodsAvoid this of object lookupSee Android developer web site for more.Responsiveness: put long process in thread with progress bar or service with listener.

51

Delhi Route Planner over Android 2.2 2012

Publishing your application• Become developer ($25)• Buy developer phone $399 + $173 (including shipping and customs to NL)<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="net.kazed.nextaction" android:versionCode="084"android:versionName="0.8.4"

Provider

public class DatabaseHelper extends SQLiteOpenHelper {public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {switch (oldVersion) {case 10:db.execSQL("ALTER TABLE " + DatabaseHelper.TABLE_TASK + " ADD COLUMN "+ Task.TYPE + " INTEGER");}}}Publish on market, updateMore informationDeveloper documentation: http://developer.android.comSDK download, Tutorials with example code, reference documentationGoogle groups: android-beginners, android-developersAndroid market: http://www.android.com/market

Book: Professional Android Application Development - Reto Meier

52

Delhi Route Planner over Android 2.2 2012

PROBLEM DEFINITION

The Problem Definition was to develop an application for Android Devices which provide a common offline Interface for fetching route details of DTC (Delhi Transport Corporation) and DMRC (Delhi Metro Rail Corporation) & Taxi Services along with Major Offices in Delhi NCR Zone. This application will also show the Current Location on Map and the Target Location which will make the Route Selection easy. The Application must enable user to run that application on small memory with High Data Accuracy and Integrity.

The Location & Map based services are Google Services which must be implemented with correct certificate and must be incorporated based on the version of Android Operating System. The Application must be able to use the Android Mail System (AMS) and Android Call System (ACS) which allows the user to directly call or mail from the device without using any external Interface.

53

Delhi Route Planner over Android 2.2 2012

INTRODUCTION

INTRODUCTION TO COMPANY

This Application is developed for CMC Pvt Ltd (A Tata Subsidiary )CMC Limited is a leading systems engineering and integration company in India, offering application design, development, testing services and asset-based solutions in niche segments through turnkey projects of national importance Since its inception on December 26, 1975, CMC has been a frontrunner in providing IT solutions and services. CMC was the first ever enterprise in India to set up a countrywide data network called INDONET - a computer network providing access to major cities in India, way back in 1985. A subsidiary of Tata Consultancy Services Limited (TCS Ltd), one of the world's leading information technology consulting, services and business process outsourcing organizations, CMC Limited is a part of the US$70 billion Tata Group, India's best known business conglomerate

Today, CMC Limited, an ISO 9001:2000, certified and CMMI Level V accredited organization, is positioned as a premier IT solutions provider in the fast growing and competitive IT market

OVERVIEW OF APPLICATION

The Project DelhiRoutePlanner is all about getting detail about routes of DTC (Delhi Transport Corporation) and DMRC (Delhi Metro Rail Corporation) without calling to customer service or searching online anywhere anytime by a small memory Handheld device like Android based Mobile or Tablet PCs. The user can get all information about the Transport Corporation (DTC & DMRC) and major taxi services running on the New Delhi & NCR.

The Platform of Android is Chosen to implement this Mobile Service. The Result of the project can be used for many purposes like Travel Planning, getting Bus route Detail, getting Metro line detail, getting contact detail of DTC, DMRC, Taxi Services

The Location & Map are Google based services which are incorporated based on the version of Android Operating System. The Application Uses Android Mail System (AMS) and Android Call System (ACS) which allows the user to directly call or mail from the device without using any external Interface.

54

Delhi Route Planner over Android 2.2 2012

TEAM DETAILS:

Total Team Strength: 4

Total Number of Modules: 5

The team would be divided to work on each module. Each team member will play a separate & crucial role during the development of their modules. They would acts as leads, team member and QA person for different sections of the modules. Once coding is complete every team member will make effort in integration and alpha testing of the application. At every stage of the deployment a regression testing phase will be undertaken to make sure that the functionality is working properly.

PLATFORM USED

3.1 HARDWARE INTERFACE

1. Intel C2D 3.0 or Compatible System2. 1GB Primary Memory(RAM)3. 120 GB Secondary memory(HDD)4. Mouse / Keyboard5. High Speed Internet Modem

3.2 SOFTWARE INTERFACE

As this application is completely android based so we have used some Google based technologies which provide flexibility to develop and deploy application on Android devices

3.2.1 Java & XML

Java is a Object oriented Programming language which provide many functionality and flexibly to develop advance. We used core java concepts like Threading, Exception Handling and Socket Programming etc to code the application

55

Delhi Route Planner over Android 2.2 2012

XML (Extensible Mark-up language) emphasize on the User Interface design of the application. The Widgets (Buttons, Text View, and Edit Text) are very light weighted and Android platform has a API to process XML data

Java 1.7.0

XML 3.0 specification

ANDROID PLATFORM

Google owns Android and provides API for developers these API can be used with Eclipse IDE to develop android based application. This also integrates the features which uses Google based Service like Google maps, Google Docs, Google Mail, Google Navigation etc.

This Eclipse IDE integrates all technologies like JAVA XML SQLite together to develop a complete Android based Application

SQLite

This is an ACID Compliant embedded relational Database Management System developed with C programming Library. This implements most of the SQL standards like Create, drop, delete commit etc. This is very small application and suites well for Android apps because SQLite database resides within the application memory.

SQLite – ver. 3.0.1

USER PLATFORM

HARDWARE PLATFORM :

1. 1GB SD Card

2. 300 MB RAM

3. GPS 2.0 support

Software Platform :

1. Android 2.0

2. Kernal 2.6.1 or above

56

Delhi Route Planner over Android 2.2 2012

PROJECT PLANNING

Gantt chart for the Delhi Route Planner system is shown below:

57

Jan 2012 Feb 2012 March 2012 April 2012

Project Start

Site Preparation

Review & Specification

Design

Conversion

Coding

Testing

Finish

Delhi Route Planner over Android 2.2 2012

FUNCTIONAL REQUIREMENTS

The Whole application is divided into modules and some modules as again divided into sub modules. Modular Programming helps developers, Testers and Analysts to produce a good and reliable system.

Major Modules in the Application are

DtcServices

This is the Major Module Divided into Sub modules and this manages all the Services Provided by DTC Section of the Application.

MetroServices

This is the Module for Metro Section Services of the Application and is further divided into Sub modules and this manages all the Services Provided by Metro Section of the Application.

Utilities

This Module Provide various utilities provided to the user like Mailing Service, Fetching Details about Delhi Major Offices with Contact number, Delhi Taxi services.

GPS

This Module Provide the GPS related Functionality to the user for Route Guiding.

Map

This Module Provide the MAPS related Functionality to the user for Route Guiding & Spot Details.

All Modules in the Application are as follows

DtcStopDetail

This Module is a Sub Module of DtcServices Module and provides the Functionality of fetching Bus No, Nearby Stops by providing Particular Stop Name.

DtcPlanRoute

58

Delhi Route Planner over Android 2.2 2012

This Module is a Sub Module of DtcServices Module and provides the Functionality of planning a route by just providing the Source & Destination.

DtcRouteDetail

This Module is a Sub Module of DtcServices Module and provides the Functionality of fetching all the details about the particular DTC Route along with the alternate ones.

DtcCustomerCare

This Module is a Sub Module of DtcServices Module and provides the Functionality of contacting to centralized DTC Customer Care via direct call or Mail.

MetroStationDetail

This Module is a Sub Module of MetroServices Module and allows the user to fetch every detail about the particular Metro station and mail it to other if needed.

MetroPlanJourney

This Module is a Sub Module of MetroServices Module and provides the Functionality of planning a route by just providing the Source & Destination. The App will also tell where to change the Line and at which Stop.

MetroLineDetail

This Module is a Sub Module of DtcServices Module and provides all detail about the metro lines this include junction point in line, line crossings, starting and ending point of Line and stations that fall in the line.

MetroCustomerCare

This Module is a Sub Module of DtcServices Module and provides the Functionality of contacting to centralized DTC Customer Care via direct call or Mail and Shows the information based on the geographical location of the user.

DelhiTaxiServices

This sub module of Utilities Module will provide the information about major taxi services in New Delhi with their Fare charges and special Offers.

MailSystem

This Module is a Sub Module of Utilities Module and provides the Functionality of mail System, this mail account will be automatically Synchronized to the existing Gmail account of the user.

59

Delhi Route Planner over Android 2.2 2012

DelhiMajorOffices

This sub module of Utilities Module will provide the information about major Offices in New Delhi with their Location & their Contact numbers.

1. NON-FUNCTIONAL REQUIRMENTS

Non-functional requirements are characteristics of the system to be achieved that are not related to

the functionality. They define the system properties and constraints and also certain system “quality

attributes. They are stated separately from the functional requirements so that users can confirm

during the requirements verification stage.

The  system’s categorized  non-functional  requirements  are  as follows:

1. Performance: In order to assess the performance of a system the following must be clearly

specified:

1.1 Response Time: System must have low response time for 100% of uses. It depends on

the type of query the system executes.

1.2. Workload: The system is able to divide the workload on the basis of the processes

running on the Android device.

1.3. Scalability: The system is fully scalable, that is on the up gradation and the large amount

of usage will not affect the performance of the system. But the user should take care of the

Data Usage of Internet service provider & the Android Security issues.

2. Security: For the security purpose, the complete powers are given to the Android DVM (Dalvik

Virtual Machine), so that no one can access the memory architecture of the Process workspace

3. Capacity: This directly impacts the performance of the system. The system must be designed to

produce large number of reports at a time.

60

Delhi Route Planner over Android 2.2 2012

4. Reliability: The system must have high reliability which can be measured on the basis of

performance. Its MTTF (Mean Time to Failure) may vary between a year and two. Moreover,

average reported defects in a month may vary between 2 to 5.

5. Ease of Use: The proposed system is GUI based Mobile system, which a novice can also handle. It

is typically a simple mobile app which need to be installed on the mobile system and hence very

easy to operate. To operate this system no special training is required by the user.

6. Interoperability: The system is capable of working with other systems in conjunction. For

Example. User can search route even if GPS is fetching location on Google Map.

8. Portability: This application can be installed on any Android Device having OS ver. above 2.0.

9. Testability: This application is a collection of various numbers of modules making it easy to test

each and every module and finally as a whole.

2. ANALYSIS

7.1 Data Flow Diagram

7.1.1 Definition

DFD is basically a two-dimensional diagram that explains how data is processed and transferred in a system. The graphical depiction identifies each source of data and how it interacts with other data sources to reach a common output

61

Delhi Route Planner over Android 2.2 2012

7.1.2 DFD Level-0

62

Delhi Route Planner over Android 2.2 2012

7.1. 3 DFD Level-1

63

Delhi Route Planner over Android 2.2 2012

64

Delhi Route Planner over Android 2.2 2012

7.1.4 DFD Level-2

2-Level DFD “DTCServices”

2-Level DFD ”Utilities”

65

Delhi Route Planner over Android 2.2 2012

7.2 Entity Relationship Diagram

7.2.1 ER Diagram

66

Delhi Route Planner over Android 2.2 2012

Description of Diagram

This depicts relationship between data objects. The attribute of each data objects noted in the entity- relationship diagram can be described using a data object description. Data flow diagram serves two purposes:1. To provide an indication of how data are transformed as they move through the system.2. To depict the functions that transformation the data flow.Attributes: Attributes define the properties of a data object three different characteristics. They can be used to:

1. Name an instance of data object.2. Describe the instance.

3. Make reference to another instance in other table.

Relationships: Data objects are connected to one another in a variety of different ways. We can define a set of object relationship pairs that define the relevant relationships.

In this the relationship between the different modules is shown in Relate to the Tables and interaction of the modules.DtcStopDetail has ‘has a’ relationship with DtcRouteDetail as a single Stop can have many routes going through it and same is with MetroStationDetail and MetroLineDetail.

The RecentLocations has a ‘depend’ relationship with all the Other Modules of the System. The CustomerCare module does not interact with any other module but like every module it can interact with AMS (Android Mail System) and ACS (Android Call System).

DATABASE DESIGN

TABLE DESIGN

SQLite Database is used in the Application to Store important and user data in the system. This is very small application and suites well for Android apps because SQLite database resides within the application memory. This Supports Only 3 data types (Integer, BLOB, Text, Number_PKey). The Name of the Database is “PlannerDatabase” and the Tables Used in the Applications are as Follows

1. Table: DtcStopDetail

Field_Name Datatype Constraint DescriptionStop_id Integer Primary key, Not Null Unique Id of stop Stop_name Text Not Null Contain name of the stopStop_routes Text Not Null Contain all routes visited at that stopNearby_stops Text Not Null Contain nearby stops to that stop

67

Delhi Route Planner over Android 2.2 2012

2. Table: DtcRouteDetail

Field_Name Datatype Constraint DescriptionRoute_no Text Primary key, Not Null Will hold the unique bus route noRoute_start Text Not Null Contain from where the route startsRoute_ends Text Not Null Contain where the Route endsMiddle _stops Text Not Null Contain all middle stops between start

& end

3. Table:MetroStationDetail

Field_Name Datatype Constraint DescriptionStation_id Integer Primary key, Not Null Unique Station id Station_name Text Not Null Name of the StationStation_line Text Not Null Metro Line colour Nearby_stations Text Not Null Nearby stations of this station

4. Table:MetroLineDetail

Field_Name Datatype Constraint DescriptionLine_Id Integer Primary key, Not Null Unique Line numberLine_colour Text Not Null, Must be 1of 5

specifiedMetro Line Colour

Interchange Text Not Null Interchange station in the lineStarts_at Text Not Null Line Starting Point station Ends_at Text Not Null Ending station of the line

5. Table: CustomerCare

Field_Name Datatype Constraint DescriptionCare_id Integer Primary key, Not Null Unique id for a customer care Care_name Text Not Null Name of the Customer care Care_category Text Not Null Metro or DTC category Website Text Not Null Website of (DTC or Metro, taxi

service)Email_id Text Not Null Email id of Particular(DTC or Metro,

taxi service)Contact Text Not Null Contact num of customer care

6. Table: TaxiServices

Field_Name Datatype Constraint DescriptionTaxi_id Integer Primary key, Not Null Unique Number to identify taxi serviceTaxi_name Text Not Null Name of the Taxi serviceTaxi_fare Text Not Null Fare per km of Taxi ServiceLocation Text Not Null Location of the taxi service officeEmail Text Not Null Email id of the taxi Service

68

Delhi Route Planner over Android 2.2 2012

Contact Text Not Null Contact Number of that Taxi service

7. Table:DelhiOfficies

Field_Name Datatype Constraint DescriptionOffice_id Integer Primary key, Not

NullUnique number to identify the office category

Office_name Text Not Null Name of the officeOffice_category Text Not Null Category of Office (Tourism, Security,

transport)Office_Location Text Not Null Location of office in delhiOffice_Contact Text Not Null Contact number of Office Email Text Not Null Email id and website of the Office

8. Table:RecentLocation

Field_Name Datatype Constraint DescriptionLocation_id Integer Primary key, Not Null Unique Id of locationLocation_name Text Not Null Name of the Location on mapLatitude Text Not Null Latitude of locationLongitude Text Not Null Longitude of the LocationRemarks Text Remark about the location

FUTURE SCOPE

This application has two parts first which need to be updated and second one which is updated automatically. If new Routes, Stops, Metro Lines, offices are added in New Delhi, this can be easily updated in the application.

But the services Like Google Maps, Google Locations, Google Nearby, GPS Receiver will be automatically updated in the Application.

69

Delhi Route Planner over Android 2.2 2012

PROJECT SNAPSHOT

70

Delhi Route Planner over Android 2.2 2012

dtc services

71

Delhi Route Planner over Android 2.2 2012

72

Delhi Route Planner over Android 2.2 2012

73

Delhi Route Planner over Android 2.2 2012

74

Delhi Route Planner over Android 2.2 2012

75

Delhi Route Planner over Android 2.2 2012

76

Delhi Route Planner over Android 2.2 2012

77

Delhi Route Planner over Android 2.2 2012

78

Delhi Route Planner over Android 2.2 2012

79

Delhi Route Planner over Android 2.2 2012

80

Delhi Route Planner over Android 2.2 2012

81

Delhi Route Planner over Android 2.2 2012

CONCLUSION

Android is a truly open, free development platform based on Linux and open source. Handset

makers can use and customize the platform without paying a royalty.

A component-based architecture inspired by Internet mash-ups. Parts of one application can

be used in another in ways not originally envisioned by the developer. can even replace built-in

components with own improved versions. This will unleash a new round of creativity in the mobile

space.

Android is open to all: industry, developers and users

Participating in many of the successful open source projects

Aims to be as easy to build for as the web.

Google Android is stepping into the next level of Mobile Internet

82

Delhi Route Planner over Android 2.2 2012

REFERENCES

Official Google Android Developer website

http://developer.android.com/reference/android/widget/TextView.OnEditorActionListener.html

http://developer.android.com/reference/javax/sql/RowSetWriter.html

http://developer.android.com/guide/topics/intents/intents-filters.html

http://developer.android.com/guide/topics/location/index.html

http://www.incurlybraces.com/gps-location-coordinates-android.html

Android Books and Text Material

McGraw Hill Android A Programmers Guide, Chapter 7, “Using Intents and the Phone Dialler”

McGraw Hill Android A Programmers Guide, Chapter 9, “Using the Cell Phone’s GPS Functionality”

McGraw Hill Android A Programmers Guide, Chapter 10, “Using the Google API with GTalk”

83