Académique Documents
Professionnel Documents
Culture Documents
2 2012
PROJECT REPORT On
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
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.
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.
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
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
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 :
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
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.
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
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
ANDROID ARCHITECTURE
11
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
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
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
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
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
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
18
19
20
21
22
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
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
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
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
27
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
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
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
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
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
33
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
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
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
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.
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.
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
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
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
Notification
47
48
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
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); } }
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
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
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
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
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
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
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
Software Platform :
1. Android 2.0 2. Kernal 2.6.1 or above
57
Project Start
Site Preparation
Design
Conversion
Coding
Testing
Finish
58
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
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
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
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
63
64
65
67
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
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
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
PROJECT SNAPSHOT
71
dtc services
72
73
74
75
76
77
78
79
80
81
82
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
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