Vous êtes sur la page 1sur 84

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 Bhawani singh ROLL NO.90752130769 (M.C.A. 6th SEM ) SUPERVISOR Mr. Sanjay Pandit

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:

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

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 (HEAD OF DEPARTMENT)

MR.ASHISH MISHRA (PROJECT GUIDE)

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, companys 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 companys 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

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: DATE :

Bhawani Singh M C A 6th (90752130769)

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

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 create 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.

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 users 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-middle38 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 users 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, its 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 betterconserved 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 Apples 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 multimedia messages or make connections to the Internet during normal device use. It is possible for somebody to use the GPS feature to track a persons 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 filesll 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 ANDROID 1. The ability for anyone to customize the Google Android platform will open up the applications playing field to small and new players who lack the financial muscle to negotiate with wireless carriers like AT&T and Orange. The consumer will benefit from having a wide range of mobile applications to choose from since the monopoly will be broken by Google Android. 2. Although this will depend on the carrier, one will be able to customize a mobile phones using Google Android platform like never before, right down to the screen. Features like weather details, opening screen, live RSS feeds and even the icons on the opening screen will be able to be customized. 3. In addition, as a result of many mobile phones carrying Google Android, companies will come up with such innovative products like the location aware services that will provide users with any information they might be in need of. This information could include knowing the location of a nearby convenience store or filling station. In addition the entertainment functionalities will be taken a notch higher by Google Android being able to offer online real time multiplayer games.

Application behavior
Every application in Android runs as a separate process with a unique UID, unlike a desktop computer where all the applications run with the same UID. The UID of an application in Android protects its data. Programs cannot typically read or write each others data, and sharing between applications must be done explicitly [3]. Due to this feature, a compromise such as a buffer overflow attack [3,17] is restricted to the application and its data. However, it is important to note that an application can launch another program that will run with the launching applications UID. 5 For a developer to run an application on the Android phone, his or her application needs to be signed. Developers can generate self-signed certificates and use this for code signing. Code signing is done to enable developers to update their own applications without creating complicated interfaces and permissions.

Application components
Applications 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 one activity is active at a time, and processing is suspended for all other activities [5]. 2. Service components provide for background processing when an applications activity leaves focus and another GUI application comes in the foreground [6]. 3. Broadcast receiver components provide a general mechanism for asynchronous event notifications [6]. The receivers receive Intent messages that are implicitly addressed with action strings; for instance, dialing a number is associated with the action
28

Delhi Route Planner over Android 2.2 2012


OUTGOING_CALL_ACTION. 4. Content provider components are the preferred method for sharing data between applications [5]. These APIs implement an SQL-like interface; however, the backend implementation is up to the application developer.

Application level security framework


Applications need approval to do things their user might object to, such as sending SMS messages, using the contacts database, or using the camera. To keep track of what the application is permitted to do, Android maintains manifest permissions that are enforced by the middleware reference monitor. The permission label is a unique text string that can be defined by the OS as well as by a third-party developer. These permissions indicate what resources and interfaces are available to the application at run-time. An example of a permission is READ_CONTACTS, which permits the application to read the users address book. In addition to reading and writing data, permissions allow applications to access system services such as dialing a number without prompting 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 the AndroidManifest.xml file; however, it is not necessary that all permissions be granted. When the application is getting installed, the user has the choice to decide whether or not to trust the software based on the applications promised features. and the permissio ns required. These permissions are different from file permissions. Once an application is installed, its permissions 7 cannot be changed. The fewer permissions an application needs, the more comfortable the user should 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]

Normal Permissions for application features with minor consequences such as VIBRATE, which lets applications vibrate the device. Suitable for granting rights not generally of keen interest to users; users can review but may not be explicitly warned. Dangerous Permissions such as WRITE_SETTINGS or SEND_SMS are dangerous as they could be used to reconfigure the device or incur tolls. This level marks permissions in which the users will be interested or be potentially surprised. Android will warn users about the need for these permissions on install. Signature These permissions can be granted only to other applications signed with the same key as this program. This allows secure coordination without publishing a public interface. SignatureOrSystem
29

Delhi Route Planner over Android 2.2 2012


Same as Signature except that programs on the system image also qualify for access. This allows programs on custom Android systems to also get the permission. This protection is to help integrate system builds and wont be typically used by developers. The permission label policy is used to protect applications from each other and also various components within an application. In the mobile phone environment, it is difficult for the operating system to manage access control policies of hundreds of unknown applications. Therefore, Android simplifies this by having the developers define their permission labels to access their interfaces. By doing so, the developer does not need to know about existing and future applications; permission labels allow the developer to indirectly influence security decisions. 8

Files and preferences


Android uses UNIX-style file permissions [2]. Each application has its own area on the file system that it owns [2,16]. This is similar to programs having a home directory to go along with their User IDs. This feature is limited only to the internal phone memory and not the external memory. The standard way for applications to expose their private data to other applications is through content providers [16].

Android limitation
The current security policy of Android works on a static level only during installation to identify whether the application is permitted all the requested permissions from the user. Once the permission is granted, there is no way to govern to whom these rights are given or how they are later exercised [3]. Permissions are asserted as vague suggestions as to what kinds of protections the application desires. One must place good faith in the user and the OS to make good choices about permissions granted to the application which, in many cases, may not be the absolute best choice. Due to the above architecture, Android system libraries have limited ability to control installed third-party applications that can be granted permissions to use their interfaces. This implies 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 such as 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 the system from malicious applications but provides severely limited infrastructure for applications to protect themselves.

30

Delhi Route Planner over Android 2.2 2012

About JAVA History of JAVA Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from Cand C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies 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 used from application software to web applications.[9][10] The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations 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 typically compiled 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 direct hardware execution of bytecode by a Java processor is also possible. Sun Microsystems provides a GNU General Public License implementation of a Java compiler and Java virtual machine, in compliance with the specifications of the Java Community Process. Java is the only one pure object oriented language available today, is now used in almost all applications, from simple home appliances control systems to complex space control systems. Javas motto is write once, run anywhere. Javas latest version includes new features that enrich and extend the java
31

Delhi Route Planner over Android 2.2 2012


platform and provides upward compatibility and improved performance. The most striking feature of the language is that it is a platform-neural language. Java is the first programming language that is not tied to any particular hardware or operating system. Some of the java features are given below. 1. Compiled and interpreted 2. Platform independent and portable 3. Object oriented 4. Robust and secure 5. Distributed 6. Familiar, simple and small 7. Multithreaded and interactive 8. High performance 9. Dynamic and extensible Object Oriented:- Java uses object-oriented concept as for basic for software design. Java provides object a clean and efficient object based development platform. Robust:- The multi-platform environment of the web places high demand on the reliability of the program to execute on a Varity of systems. Thus high priority has been given to create robust and highly reliable programmers in the design of java. Secure:- Prior to Java, most users did not download executable programs frequently, and those who did scanned them for viruses prior to execution. Even so, most users still 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 can gather 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 these concerns by providing a "firewall" between a networked application and the computer. When one uses a Java-compatible Web browser, one can safely download Java applets without fear of viral infection or malicious intent. Java achieves this protection by confining a Java program to the Java execution environment and not allowing it to access other parts 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 important aspect of Java.

Architecture Natural:- Java was designed to support application on heterogeneous network environments composed of Varity of processors and the operating system architecture and multiple programming interface. To enable java application to execute anywhere on the network, the java compiler generates the byte code instruction which are not dependent upon particular computer architecture. These instructions are then interpreted on any machine and translated 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 type incompatibilities across the hardware and software architectures. Interpreted:- Java byte code is not directly executed by the system, because java is interpreted. The speed is more than adequate for most interactive application. The speed will
32

Delhi Route Planner over Android 2.2 2012


continue to improve further. Multithreaded:- Java was designed to meet the real world requirement of creative, interactive, networked programs. Javas multithreading capability providers the means to build application with many concurrent threads of activity. The multithreading feature of java as various sophisticated synchronization primitives. Moreover, the javas high level system libraries have been written to be threading safe. Dynamic:- Java complier is strict in its static checking during compiles time, the language and run time system are dynamic during linking and loading stages. Classes are linked only as needed. New code modules can be linked in on demand from a variety of course, even from the network in a number. High performance:- Java enables the creation of cross-platform programs by compiling into an intermediate representation called java byte code. This code can be interpreted on any system that provides a java a virtual machine. The java byte code was carefully designed so that it would to be easy to translate directly into native machine code for very high performance by using a just-in-time complier. Distributed:- Java is distributed environment of the Internet and it handles TCP/IP protocol. Java included features for intra-address-space messaging. That allowed object toexecute procedure remotely. Java revived these interface in a package called remote method invocation. This feature brings an unparalleled level of abstraction to client/server programming. Security Features in Java The security features provided by the Java Development Kit (JDK) are intended for a variety of audiences: Users running programs:- Built-in security functionality protects you from malevolent programs (including viruses), maintains the privacy of your files and information about you, and authenticates the identity of each code provider. You can subject applications and applets to security controls when you need to. Developers:- You can use API methods to incorporate security functionality into your programs, including cryptography services and security checks. The API framework enables you to define and integrate your own permissions (controlling access to specific resources), cryptography service implementations, security manager implementations, and policy implementations. In addition, classes are provided for management of your public/private key pairs and public key certificates from people you trust. Systems administrators, developers, and users:- JDK tools manage your keystore (database of keys and certificates); generate digital signatures for JAR files, and verify the authenticity of such signatures and the integrity of the signed contents; and create and modify the policy files that define your installation's security policy. The GUI is designed in Java using swing components. Swing components provide GUI environment to Java. Swing components are a collection of lightweight visual components that provide a replacement

33

Delhi Route Planner over Android 2.2 2012

Overview of ECLIPSE

Eclipse Enterprise Workbench is a full-featured, Enterprise class platform and tool suite for developing software applications and systems supporting the full life-cycle of application development. Facilities and features usually found only in high-priced, Enterprise class product are included in Eclipse. Based on the open industry standards and the Eclipse platform, Eclipse redefines software pricing, support and delivery release cycles by providing a complete applications development environment for J2EE WEB, XML, UML and databases and the most comprehensive array of application server connectors(25 target environments) to optimize development, testing and portability. The Android platform is a software stack for mobile devices. In this two-part screencast you are going to see how to install and use the Android SDK to develop a simple Android application using the Java programming language and Eclipse IDE plugin. The first screencast shows how to install SDK, configure the Eclipse plugin and run sample Android applications. Total running time 03:00 minutesThe second tutorial covers new project creation in Eclipse, the use of Android emulator, content model, permissions and navigation model. Total running time 02:50 minutes. Most people know Eclipse as an integrated development environment (IDE) for Java. Eclipse is created by an open source community and is used in several different areas, e.g. as IDE for Java or for Android or as a platform to develop Eclipse RCP applications, etc.. The usage of Eclipse as a Java development environment will be described in this tutorial. Starting out with the right Eclipse package will smooth your transition from either j2me novice to Android 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 application development. You can find the author's blog at Mobilebytes . While it is true that the beginning Android application developer may use the Eclipse ADT plugins at some point, he or she progresses beyond that to use heap dumps and profile dumps to optimize code. Whereas Eclipse MAT (Memory Analyzer Technology) provides one the ability to read the heap dump once it is converted with a converter contained in the Android SDK and the Eclipse TPTP project allows us 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 all externally observable data objects, evaluate the flow and content of information, define and elaborate all software functions, understand software behaviour that affects the system, establish system interface characteristics, and uncover additional design constraints. Each of these tasks serves to describe the problem so that an overall solution may be synthesized. The Proposed system has been developed for the present requirements, which is advantageous over the existing system. Here radio can be listen online, which are completely
34

Delhi Route Planner over Android 2.2 2012


internet based is and the proposed system is highly user friendly. Since the proposed system having number of stations so user will like this application. MODELING During software requirements analysis, we create models of it to be built to gain better understanding of the actual logical entities (functions and sub functions) to be built. The following are the roles of models in requirements analysis. The model helps analyst to understand information, function, and behavior of the system. 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 STUDY The 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 the ramifications of the project. In project finance, the pre-financing work (sometimes referred to as due diligence) is to make sure there is no "dry rot" in the project and to identify project risks ensuring they can be mitigated and managed in addition to ascertaining "debt service" capability Feasibility is a measure of how beneficial the development of the information system will be to an organization. This is done by investigating the existing system proposal according to its workability, impact on the organization, ability to meet user needs, and effective use of resources. Few key considerations are involved in the feasibility analysis: economic, technical and social etc..

Economic Feasibility: Economic analysis is the most frequently used method for evaluating the effectiveness of a proposed system. It is more commonly known as cost benefit analysis, the procedure to determine the benefits and saving that are expected from a decision is made to doing 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. Projectrelated costs such as software purchase, training personnel, data collection, documents preparation costs etc. 3. Ongoing costs such as hardware, software maintenance, rental, depreciation of hardware costs etc. Technical Feasibility: In examining Technical feasibility of the system, ore importance is given to the hardware interaction part of the system. The assessments of technical feasibility centers on the existing system and to what extent it can support the proposed addition. This was based on an outline design of system requirements in turns of inputs, files programs, procedures and staff. It involves financial considerations to accommodate technical enhancements. The propose system has three-tier architecture consisting of SQLite as the database, Application Server as SQLite as
35

Delhi Route Planner over Android 2.2 2012


the middle tier and Internet developer suite oracle as the development tool. The software is very user friendly for both developers and end users. Social feasibility: People are inherently resistant to change and mobiles have been known to facilitate change. An estimate should be made about the reaction of the user staff towards the development of a computerized system. Computer installations have something to do with turnover, transfers and changes in job status. The introduction of a candidate system requires special effort to educate, sell and train the staff for conducting the business. The proposed software is designed such that only persons can access it having android 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 to achieve and sustain process improvement. Management support, employee involvement, and commitment are key elements required to ascertain managerial feasibility. Economic Feasibility: This involves the feasibility of the proposed project to generate economic benefits. A benefit-cost analysis and a breakeven analysis are important aspects of evaluating the economic feasibility of new industrial projects. The tangible and intangible aspects of a project should be translated into economic terms to facilitate a consistent basis for evaluation. Financial Feasibility: Financial feasibility should be distinguished from economic feasibility. Financial feasibility involves the capability of the project organization to raise the appropriate funds needed to implement the proposed project. Project financing can be a major obstacle in large multi-party projects because of the level of capital required. Loan availability, credit worthiness, equity, and loan schedule are important aspects of financial feasibility analysis. Cultural Feasibility: Cultural feasibility deals with the compatibility of the proposed project with the cultural setup of the project environment. In labor-intensive projects, planned functions must be integrated with the local cultural practices and beliefs. For example, every one using mobile so it is cultural feasible. Safety Feasibility: Safety feasibility is another important aspect that should be considered in project planning. Safety feasibility refers to an analysis of whether the project is capable of being implemented and operated safely with minimal adverse effects on the environment. Unfortunately, environmental impact assessment is often not adequately addressed in complex projects. As an example, the North American Free Trade Agreement (NAFTA) between the U.S., Canada, and Mexico was temporarily suspended in 1993 because of the legal consideration of 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 true for large projects with national visibility that may have significant government inputs and
36

Delhi Route Planner over Android 2.2 2012


political implications. For example, political necessity may be a source of support for a project regardless of the project's merits. On the other hand, worthy projects may face insurmountable opposition simply because of political factors. Political feasibility analysis requires an evaluation 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 and outright active opposition by those claiming environmental concerns. This is an aspect worthy of real attention in the very early stages of a project. Concern must be shown and action must be taken to address any and all environmental concerns raised or anticipated. A perfect example was the recent attempt by Disney to build a theme park in Virginia. After a lot of funds and efforts, Disney could not overcome the local opposition to the environmental impact that the Disney project would have on the historic Manassas battleground area. Market Feasibility. Another concern is market variability and impact on the project. This area should not be confused with the Economic Feasibility. The market needs analysis to view the potential impacts of market demand, competitive activities, etc. and "divertible" market share available. Price war activities by competitors, whether local, regional, national or international, must also be analyzed for early contingency funding and debt service negotiations during the start-up, ramp-up, and commercial start-up phases of the project . Feasibility Areas The Feasibility Study is the preliminary study that determines whether a proposed systems project is technically, financially, and operationally viable. The Alternatives Analysis, usually included as part of the Feasibility Study, identifies viable alternatives for the system design and development. Between them, the documents provide: An analysis of the system objectives, 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 and goals; and Identification of a proposed approach. Scope of Feasibility Analysis In 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 may affect the organization itself, another organization, the public, or the government. A preliminary study is then conducted to confirm and evaluate the need. A proposal of how the 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 required to satisfy the need. The work may be performed by a consultant who is an expert in the project field. The preliminary study often involves system models or prototypes. For
37

Delhi Route Planner over Android 2.2 2012


technology-oriented projects, artist's conception and scaled-down models may be used for illustrating the general characteristics of a process. A simulation of the proposed system 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 be done 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 the initial and operating costs are included in the cost estimation. Estimates of capital investment and of recurring and nonrecurring costs should also be contained in the cost estimate document. Sensitivity analysis can be carried out on the estimated cost values to see 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. The analysis should consider rates of return, inflation, sources of capital, payback periods, breakeven point, residual values, and sensitivity. This is a critical analysis since it determines whether or not and when funds will be available to the project. The project cash profile helps to support the economic and financial feasibility of the project. Project Impacts. This portion of the feasibility study provides an assessment of the impact of the proposed project. Environmental, social, cultural, political, and economic impacts may be some of the factors that will determine how a project is perceived by the public. The value added potential of the project should also be assessed. A value added tax may be assessed based on the price of a product and the cost of the raw material used in making the product. The tax so collected may be viewed as a contribution to government coffers. Conclusions and Recommendations. The feasibility study should end with the overall outcome of the project analysis. This may indicate an endorsement or disapproval of the project. Recommendations on what should be done should be included in this section of the feasibility report. SOFTWARE REQUIREMENT SPECIFICATION

REQUIREMENT SPECIFICATION An accurate and thorough understanding of system requirements is essential to the success of any Software Development Process. All further stages of SDLC like system analysis, design and coding depend on how accurate well prepared and thoroughly understood the System Requirements Specification is. Poorly analyzed requirements will disappoint the user no matter how well designed and the well coded the software is. Requirement specification appears to be a relatively simple task but the chances of misinterpretation is very high, ambiguity is probable and communication gap between customer and developer is bound to bring confusions. Requirement Specifications begin with a clear and concise heading stating in a sentence the task to be performed (i.e. work objective). For
38

Delhi Route Planner over Android 2.2 2012


this, we have to identify the problem first. Problem specifications serve as the basis for identifying work objective that helps in describing the requirements in technical and precise statements. After the initial specification reports are received, they are analyzed and refined through customer-developer interaction. System Analysis follows to determine feasibility and Cost Benefit Analysis. A complete understanding of requirement specification of the new system is very important for the successful development of the software product. Requirement specification is the foundation in the process of software development. All further development like System Analysis, System Design, and Coding will depend on how accurate and well prepared the requirement.

Overall Description Requirement specification appears to be relatively simple task, but appearances are often deceiving. There is always a chance of wrong specification because of communication gap 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 be performed. Then requirements are described in a technical manner in precise statements. After the initial specification reports are received, they are analyzed and refined through user developer interaction. System Analysis follows to determine and cost benefit analysis. An SRS is basically an organization's understanding (in writing) of a customer or potential client's system requirements and dependencies at a particular point in time (usually) prior to any actual design or development work. It's a two-way insurance policy that assures that both the client and the organization understand the other's requirements from that perspective at The SRS document itself states in precise and explicit language those functions and capabilities a software system (i.e., a software application, an ecommerce Web site, and so on) must provide, as well as states any required constraints by which the system must abide. The SRS 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 project management documents, such as design specifications, statements of work, software architecture specifications, testing and validation plans, and documentation plans, are related to it. It's important to note that an SRS contains functional and nonfunctional requirements only; it doesn't offer design suggestions, possible solutions to technology or business issues, or any 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 been overtaken by a new range of platform called the Google android phones. Smart mobiles with android platform are on high-rise in the present scenario. It is doing a steady business to compete the apple ranges. Apples iPhone, pads and tablets are based on apple OS, which it supports only apple based hardware. The android smart phones are truly helpful with open source platform and support all kinds of hardware. Thus it was
39

Delhi Route Planner over Android 2.2 2012


able 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 for gaining knowledge. As it is handy and compatible, it is used wherever needed. Its applications are truly simple, which people with basic operating knowledge of mobile phone or computer could handle easily. Android developers in India offer the best of services and applications in different areas. It includes maintenance and upgrade, business, entertainment, games, multimedia, weather updates, etc. Each of the developers is hired from the leading engineering colleges in the country. They are given complete training andassistance to handle all latest techniques and methodologies. Every complex development project is handled at ease by the team of these skilled developers.

Android developers in India frame the main role in the application development process. Due to the rapid growth of such advanced platform, they are on high need. With efficient professional experience and creativity, they can prove their talent giving best output. The growth of mobile business has led to the demand of developers. They are hired by part-time, full-time or on project basis. Apart from these, there are also freelance developers working to give the best applications. Android engineers with efficient skills holds a great range of opportunities, where they could develop applications as well do their role in mobile websites. They offer services at affordable rates with excellent customer support and assistance. These skilled professionals working on project basis, stay connected to their clients reporting regular updates. The client can select upon daily or weekly updates in par to the project. Moreover, the client holds the opportunity to select their team members, which they prefer to offer the project. There are several advantages from the client side, as they could gain more details when working with these experts. They can also find solutions to other software related problems. Therefore, it is considered quite flexible to Hire Android Developers. They are connected with just submitting the quote form present in their website. Moreover, there is 24 hours customers support and assistance offered, while ready to present complete solutions for all software queries. Their services are very much affordable, which every small 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


40

Delhi Route Planner over Android 2.2 2012


<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android: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>

Activity Controller of a screen public 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 layout Binding via id of view component: android:id=@+id/name, use findViewById Eclipse plugin generates R class with layout and other resources, id's advantage: auto-completion

Demo Eclipse View XML Preview layout, locale, portrait/landscape, screen size Buttons - context editor Save button saveButton = (Button) findViewById(R.id.save_button); saveButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish();
41

Delhi Route Planner over Android 2.2 2012


} }); Bind save button Listener onClick user clicks on button Activity finish() - back to previous screen

Navigation Navigation 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 call When you receive phone call: onPause() and after call: onResume() Low on memory Low on memory: onPause() and process is killed Change orientation Portrait/landscape Activity on foreground onPause(), onStop(), onDestroy() Change layout onCreate(), onStart(), onResume() Practical data retrieve/save When your application gets killed because of low memory and you want to save the data of user, you can do this in onPause(), in normal data save or maybe in temporary space somewhere and recover later. This is also useful in other situations, like back button. Simple solution: onCreate(): retrieve onPause(): save

UI Layout widgets AbsoluteLayout x/y coordinates, inflexible LinearLayout horizontal/vertical, simple, flexible RelativeLayout position relative to other components, flexible, more complex TableLayout rows/columns View components: List Button Text view/edit Spinner Google map, and more... Navigation With parameters Bundle bundle = new Bundle(); bundle.putString("myparameter", "Hello world"); intent.putExtras(bundle); You can use Parcelable interface to add other classes to bundle. Get results back private static final int EDIT_ITEM = 2;
42

Delhi Route Planner over Android 2.2 2012


... startActivityForResult(intent, EDIT_ITEM); onPause() onCreate() Retrieve data Save data After Activity2 is finished, Activity1 gets back: protected void onActivityResult(int requestCode, int resultCode, Intent data) { 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) { Uri contextUri = getIntent().getData(); To other application Intent intent = new Intent(Intent.ACTION_PICK, Uri.parse("content://contacts/people")); startActivityForResult(intent, CHOOSE_CONTACT); protected void onActivityResult(int requestCode, int resultCode, Intent data) { // data.getDate() == "content://contacts/people/2" } Activity1 Activity2 Intent Intent AndroidManifest.xml Match 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>
43

Delhi Route Planner over Android 2.2 2012


<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>

Data Storage Files Internal: 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 Reading SharedPreferences settings = getSharedPreferences( "MyPrefsFile", MODE_PRIVATE); String userName = settings.getString("userName", "defaultUser"); Writing SharedPreferences settings = getSharedPreferences( "MyPrefsFile", MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); editor.putString("userName", userName); editor.commit();

SQLite Execute SQL directly SQLiteDatabase db = ... db.execSQL("CREATE TABLE context (" + "_id INTEGER PRIMARY KEY," + "name TEXT" + ");"); Query public Cursor query (SQLiteDatabase db, String[] projectionIn, // selected fields String selection, String[] selectionArgs, // where clause and values String groupBy, String having, String sortOrder) Example SQLiteQueryBuilder contextQuery = new SQLiteQueryBuilder(); contextQuery.setTables("context");
44

Delhi Route Planner over Android 2.2 2012


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 name if (cursor.moveToFirst()) { String name = cursor.getString(columnIndex); } Update public int update ( String table, ContentValues values, // map of update values String whereClause, String[] whereArgs) Example ContentValues values = new ContentValues(); values.put(GtdContext.Column.NAME, newName); db.update(DatabaseHelper.TABLE_CONTEXT, values, GtdContext.ID + " = ?", new String[] {Integer.toString(contextId)}); ContentProvider Standard 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"/> Query public abstract Cursor query ( Uri uri, // ID of item or items String[] projection, // selected fields String selection, String[] selectionArgs, // where clause and values String sortOrder) Insert public abstract Uri insert (Uri uri, ContentValues values) Update public abstract int update (Uri uri, ContentValues values, String selection, String[] selectionArgs) Delete public abstract int delete (Uri uri, String selection, String[] selectionArgs) Example public 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,
45

Delhi Route Planner over Android 2.2 2012


new String[] {ID, NAME}, null, null, null); Implement ContentProvider Query public 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 matcher public static final String PACKAGE = "net.kazed.android.gtd.database.GtdAndroid"; static { URI_MATCHER = new UriMatcher(UriMatcher.NO_MATCH); URI_MATCHER.addURI(PACKAGE, "context", CONTEXTS); URI_MATCHER.addURI(PACKAGE, "context/#", CONTEXT_ID); // ... } Implement insert, update, delete public 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 mapping public 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 type Uri itemUri = Uri.parse( "content://net.kazed.android.gtd.database.GtdAndroid/context/1"); Intent intent = new Intent(Intent.ACTION_VIEW, itemUri); startActivity(intent);
46

Delhi Route Planner over Android 2.2 2012


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>

Notification

47

Delhi Route Planner over Android 2.2 2012

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

48

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( 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

49

Delhi Route Planner over Android 2.2 2012

Background process Alarm AlarmManager 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); BroadcastReceiver public class StartDateProcessor extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { } }

Send broadcast Intent 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> Service public class MyService extends Service { public void onCreate() { super.onCreate(); } public IBinder onBind(Intent intent) { return null; } public void onStart(Intent intent, int startId) { super.onStart(intent, startId); } }

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

Phone features Camera Camera camera = Camera.open();


50

Delhi Route Planner over Android 2.2 2012


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);

GPS LocationManager 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 sensors SensorManager 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);

Testing Dependency 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
51

Delhi Route Planner over Android 2.2 2012


SAX parser: small and lightweight

Performance Avoid new Prefer static helper methods Avoid this of object lookup See Android developer web site for more. Responsiveness: put long process in thread with progress bar or service with listener.

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"

52

Delhi Route Planner over Android 2.2 2012

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, update More information Developer documentation: http://developer.android.com SDK download, Tutorials with example code, reference documentation Google groups: android-beginners, android-developers Android market: http://www.android.com/market Book: Professional Android Application Development - Reto Meier

53

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.

54

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.
55

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. 2. 3. 4. 5. Intel C2D 3.0 or Compatible System 1GB Primary Memory(RAM) 120 GB Secondary memory(HDD) Mouse / Keyboard 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

56

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

57

Delhi Route Planner over Android 2.2 2012


PROJECT PLANNING
Gantt chart for the Delhi Route Planner system is shown below:
Jan 2012 Feb 2012 March 2012 April 2012

Project Start

Review & Specification

Site Preparation
Design

Conversion

Coding

Testing

Finish

58

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

59

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.

60

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 systems categorized non-functional requirements are as follows: 1. Performance: In order to assess the performance of a system the following must 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. be clearly

61

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

62

Delhi Route Planner over Android 2.2 2012

7.1.2 DFD Level-0

63

Delhi Route Planner over Android 2.2 2012

7.1. 3 DFD Level-1

64

Delhi Route Planner over Android 2.2 2012

65

Delhi Route Planner over Android 2.2 2012


7.1.4 DFD Level-2

2-Level DFD DTCServices

2-Level DFD Utilities


66

Delhi Route Planner over Android 2.2 2012


7.2 Entity Relationship Diagram 7.2.1 ER Diagram

67

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 entityrelationship 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 Stop_id Stop_name Stop_routes Nearby_stops Datatype Integer Text Text Text Constraint Primary key, Not Null Not Null Not Null Not Null Description Unique Id of stop Contain name of the stop Contain all routes visited at that stop Contain nearby stops to that stop
68

Delhi Route Planner over Android 2.2 2012


2. Table: DtcRouteDetail Field_Name Route_no Route_start Route_ends Middle _stops Datatype Text Text Text Text Constraint Primary key, Not Null Not Null Not Null Not Null Description Will hold the unique bus route no Contain from where the route starts Contain where the Route ends Contain all middle stops between start & end

3. Table:MetroStationDetail Field_Name Station_id Station_name Station_line Nearby_stations Datatype Integer Text Text Text Constraint Primary key, Not Null Not Null Not Null Not Null Description Unique Station id Name of the Station Metro Line colour Nearby stations of this station

4. Table:MetroLineDetail Field_Name Line_Id Line_colour Interchange Starts_at Ends_at Datatype Integer Text Text Text Text Constraint Primary key, Not Null Not Null, Must be 1of 5 specified Not Null Not Null Not Null Description Unique Line number Metro Line Colour Interchange station in the line Line Starting Point station Ending station of the line

5. Table: CustomerCare Field_Name Care_id Care_name Care_category Website Email_id Contact Datatype Integer Text Text Text Text Text Constraint Primary key, Not Null Not Null Not Null Not Null Not Null Not Null Description Unique id for a customer care Name of the Customer care Metro or DTC category Website of (DTC or Metro, taxi service) Email id of Particular(DTC or Metro, taxi service) Contact num of customer care

6. Table: TaxiServices Field_Name Taxi_id Taxi_name Taxi_fare Location Email Datatype Integer Text Text Text Text Constraint Primary key, Not Null Not Null Not Null Not Null Not Null Description Unique Number to identify taxi service Name of the Taxi service Fare per km of Taxi Service Location of the taxi service office Email id of the taxi Service
69

Delhi Route Planner over Android 2.2 2012


Contact Text Not Null Contact Number of that Taxi service

7. Table:DelhiOfficies Field_Name Office_id Office_name Office_category Office_Location Office_Contact Email Datatype Integer Text Text Text Text Text Constraint Primary key, Not Null Not Null Not Null Not Null Not Null Not Null Description Unique number to identify the office category Name of the office Category of Office (Tourism, transport) Location of office in delhi Contact number of Office Email id and website of the Office

Security,

8. Table:RecentLocation Field_Name Location_id Location_name Latitude Longitude Remarks Datatype Integer Text Text Text Text Constraint Primary key, Not Null Not Null Not Null Not Null Description Unique Id of location Name of the Location on map Latitude of location Longitude of the Location 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.

70

Delhi Route Planner over Android 2.2 2012

PROJECT SNAPSHOT

71

Delhi Route Planner over Android 2.2 2012

dtc services
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

82

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

83

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 Phones GPS Functionality McGraw Hill Android A Programmers Guide, Chapter 10, Using the Google API with GTalk

84

Vous aimerez peut-être aussi