Major Project on Android Text EditorSubmitted in the partial fulfillment of the requirement for the award of the degree of Bachelor of Technology In Computer Science Engineering Under the supervision of Mr. Anshul Saini Submitted by: Ankit Aggarwal Mohit Bansal Saurabh Sharma 0461562707 0521562707 0291562707 Northern India Engineering College, Affiliated to G.G.S.I.P.U, Delhi [2007-2011] Certificate This is to certify that the dissertation/project report (Course code) entitled “ANDROID TEXT EDITOR” done by Ankit Aggarwal, Mohit Bansal and Saurabh Sharma is an authentic work carried out by him at NORTHERN INDIA ENGINEERING COLLEGE under my guidance. The matter embodied in this project work has not been submitted earlier for the award of any degree to the best of my knowledge and belief. Date: 6th May,2011 (Signature) Mr Anshul Saini Senior Lecturer CS Department (NIEC) 1 Anshul Saini for providing me with his valuable support and time. Ankit Aggarwal Mohit Bansal Saurabh Sharma 0461562707 0521562707 0291562707 2 . for sharing his knowledge and guiding me throughout the project. Mr. I are also thankful to the Head Of Department (CS). Saurabh Gupta for allocating me such humble and enthusiastic mentor who were ready to help anytime.Acknowledgements We are very grateful to my mentor Mr. 7 ………………………………………………………. ER Diagram Data Flow Diagram ………………………………………………………. 5... 14 15 16 7. System Features ……………………………………………………. 5 Problem Statement Purpose Document Conventions ………………………………………………………. 13 ………………………………………………………….…………………………………………………… 5 Introduction …………………………………………………………. 15 ………………………………………………………. 19 21 26 27 28 3 . 6 References …………………………………………………………… 6 Body of the report …………………………………………………… 7 Overall Description About Android OS Product Perspective Product Features ……………………………………………………….. 11. 3. 4 ………………………………………………………... Abstract ………………………………………………………………. 10. Screenshots …………………………………………………………… Constraints …………………………………………………………… References …………………………………………………………… Appendix ……………………………………………………………. 13 ………………………………………… 13 13 …………………………………………………… User Classes and Characteristics Operating Environment …………………………………. 9.... …………………………………………………… 5 5 5 …………………………………………………………………….. 12 ……………………………………………………….. 12. Diagrams ……………………………………………………………. Use Case Diagram ………………………………………………………………....... 6. 17 8. Intended Audience and Reading Suggestions ……………………………. 5 4. 13 User Documentation External Interface Requirements Other Non-functional Requirements ………………………………………… 13 ……………………………………. Overview ……………………………………………………………..Table of Contents 1. Table of Figures ... 4 Android Text Editor 2... 13 Design and Implementation Constraints ………………………………………………………. viz. copy. edit and save files of various types. Cut. C/C++. Data transformation – Reading or merging the contents of another text file into the file currently being edited. the Android OS.Abstract Android Text Editor A text editor is a type of program used for editing plain text files. or between files. Typical features: String searching algorithm – search string with a replacement string. and can be used to change configuration files and programming language source code. text files. HTML. Conditional Search and Replace. Ability to handle UTF-8 encoded text. The application is designed to open. Global(ly) Search And Replace. This project “Android Text Editor” is aimed at providing such facilities for a mobile platform. and paste – most text editors provide methods to duplicate and move text within the file. Unconditional Search and Replace. CSS or any other file based on the UTF-8 encoded text format. Text editors are often provided with operating systems or software development packages. Some text editors provide a way to insert the output of a command issued to the operating system's shell. Different methods are employed. 4 . Therefore there are lots of abstractions to represent in a more convenient way the objects and their behavior on the system. Every requirement statement is assumed to have its own priority as to define in most appropriate way the system behavior. developer. User: The user of this program reviews the diagrams and the specifications presented in this document and determines if the software has all the suitable requirements and if the software developer has implemented all of them. 3. Tester: The tester needs this document to validate that the initial requirements of this programs actually corresponds to the executable program correctly. tester. must firstly consult this document and update the requirements with appropriate manner so as to not destroy the actual meaning of them and pass the information correctly to the next phases of the development process. Purpose The purpose of this document is to specify the requirements and preview some elements of the Android Text Editor. 2. Here are the potential uses for each one of the reader types: Developer: The developer who wants to read. Problem Statement We have been provided with a problem of developing a software which is compatible with ANDROID mobile phones through which the user can create and edit text files on the go. where it is needed. 5 . Intended Audience and Reading Suggestions This document is intended for any individual user. modify or add new requirements into the existing program.Table of Figures The various diagrams from UML which have been used by us to enhance our goal of describing our project are as follows: ER Diagram Use Case Diagram DFD Introduction 1. change. and serve only for better understanding of the deployment. In addition there are various figures that represent the described system. project manager or documentation writer that needs to understand the basic system architecture and its specifications. Document Conventions In general this document prioritizes in writing the schema of the Android Text Editor development mechanism that takes hold in this project and then analyzing in detail the tools that are available in the Text editor. 4. References This citation is used as a model of reference: [IEEE STD 830-1998] 6 . the main constraints and the list any assumed factors that used within this document. Other Nonfunctional Requirements: Provide some other constraints that apply to factors such as performance. External Interface Requirements: Provide the visualization of the program and the requirements that are related with hardware. Introduction: Provide an overview of the application.This document contains the necessary requirement and some aspects of the analysis of the requirements and is organized based on the IEEE Standard for Software Requirements Specification (IEEE 830-1993). 5. safety and security. 4. Overall Description: Provide the specification of the system model. Overview 1. System Features: Provide the analysis of the requirements by feature. 2. 3. software and networking. describe the document structure and point the individual objectives. the classes model. TECHNICAL FEASIBILITY: As the product is being complemented by a user manual and documentation therefore there will be no problems in handling the project by the staff. 2. and • Bionic libc. About Android OS Android is a software stack for mobile devices that includes an operating system. also the records are very critical therefore the backup will also be required which would lead to increase in the cost of its maintenance. purchased the initial developer of the software. 2. The Android Open Source Project (AOSP) is tasked with the maintenance and further 7 .Body Of The Report 1. The technical feasibility is high as the software is coded in .. Android Inc. Feasibility test is critical .The dimensions that define the feasibility of project are: FINANCIAL FEASIBILITY: The total cost of the project is the cost of making the software plus maintaining it. Google Inc. • WebKit layout engine.JAVA which is a platform independent language and therefore can be installed on any computer. middleware and key applications. RESOURCE FEASIBILITY: The resources have to be acquired by the company for deploying the software. The Android open-source software stack consists of Java applications running on a Java-based. Libraries written in C include• The surface manager. BEHAVIOURAL FEASIBILITY: The user needs not be trained in using the software or have any past experience of working in the software because it is very user friendly. • SQLite RDBMS. • SSL.1 million lines of Java. The cost for maintaining the software is very high as the records to be maintained are of huge size and therefore acquire more space. • SGL graphics engine. The cost of making the software is negligible as compared to cost of maintaining it. 2. and 1.75 million lines of C++.0 3D graphics API. The Android operating system consists of 12 million lines of code including 3 million lines of XML. in 2005.8 million lines of C. Android's mobile operating system is based on a modified version of the Linux kernel. • OpenGL ES 2. object-oriented application framework on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Overall Description Feasibility of the project The feasibility of the product is a question that confirms the reality to the ideas. Google and other members of the Open Handset Alliance collaborated on Android's development and release. • OpenCore media framework. Our vision is that the powerful platform we're unveiling will power thousands of different phone models. a consortium of eighty hardware. Garmin Ltd.development of Android. On the same day. and Vodafone Group Plc. Google also keeps the reviewed issues list publicly open for anyone to see and comment. controlling the device via Google-developed Java libraries. Google released most of the Android code under the Apache License. Licensing With the exception of brief update periods. the Open Handset Alliance also unveiled their first product. Developers write primarily in the Java language.000 apps available for Android. Asustek Computer Inc. a consortium of several companies which include: Broadcom Corporation Nvidia Google Qualcomm HTC Samsung Electronics Intel Sprint Nextel LG T-Mobile Marvell Technology Group Texas Instruments Motorola The goal of the Open Handset Alliance is to develop open standards for mobile devices. Android has a large community of developers writing applications ("apps") that extend the functionality of the devices. though apps can also be downloaded from third party sites. 2007 the Open Handset Alliance unveiled itself. Android has been available under a free software/open source license since 21 October 2008. There are currently over 150. a mobile device platform built on the Linux kernel version 2. software. Softbank. On December 9." -Eric Schmidt. Atheros Communications. 8 . 14 new members joined. and telecom companies devoted to advancing open standards for mobile devices.6. including ARM Holdings. 2008. The Android operating system is the world's best-selling Smartphone platform. a free software and open source license. Google published the entire source code (including network and telephony stacks) under an Apache License. Android. Open Handset Alliance "Today's announcement is more ambitious than any single 'Google Phone' that the press has been speculating about over the past few weeks. Sony Ericsson. former Google Chairman/CEO On the November 5. The unveiling of the Android distribution on 5 November 2007 was announced with the founding of the Open Handset Alliance. Toshiba Corp. Android Market is the online app store run by Google. PacketVideo. 1 (Eclair). These updates to the base operating system typically focus on fixing bugs as well as adding new features. where tablet manufacturers put a non-tablet optimized phone OS (Android 2.0 (Honeycomb).5 support 2.2 (Froyo). Devices must also meet this definition to be eligible to license Google's closed source applications. and added support for Near Field Communication 3. Version history Android has seen a number of updates since its original release. which refined the user interface.4 (Gingerbread). Google claims this is done to eliminate manufacturers putting a tablet-specific OS on phones. The Honeycomb SDK has been released and the first device featuring this version. which calls into question the "open-ness" of this Android release. and added Wi-Fi hotspot tethering and Adobe Flash support 2. Google has chosen to withhold the source code for the time being.Even though the software is open-source. went on sale in February 2011.0/2. including Android Market. The upcoming version of Android is: Ice Cream.3/2. Generally each new version of the Android operating system is developed under a code name based on a dessert item. which revamped the user interface and introduced HTML5 and Exchange ActiveSync 2. which introduced speed improvements with JIT optimization and the Chrome V8 JavaScript engine." with a possible release in mid-2011 9 . device manufacturers cannot use Google's Android trademark unless Google certifies that the device complies with their Compatibility Definition Document (CDD). a combination of Gingerbread and Honeycomb into a "cohesive whole. much like the previous autumn. and supports multicore processors and hardware acceleration for graphics. improved the soft keyboard and copy/paste features. the Motorola Xoom tablet. a tablet-oriented release which supports larger screen devices and introduces many new user interface features. The most recent released versions of Android are: 2.x) on their Tablets resulting in bad user experiences. TV and other devices. including the Dell Streak. This was followed later in 2010 with the Samsung-made Nexus S. the Nexus One. released on 22 October 2008. Samsung Galaxy Tab. netbooks and tablets. 10 .Architecture System architecture of Android can be understood with this diagram: Hardware running Android The Android OS can be used as an operating system for cellphones. The first commercially available phone to run the Android operating system was the HTC Dream. In early 2010 Google collaborated with HTC to launch its flagship Android device. apk format and stored under /data/app folder on the Android OS (the folder is accessible to root user only for security reasons).5 billion total downloads. build and debug Android applications as well as control attached Android devices (e. Android applications are packaged in .. sample code. On 23 September 2008 the Android 1. triggering a reboot. applications and widgets available on the Android Market.4. older platforms and tools can also be downloaded for compatibility testing. libraries. allowing users to browse and 11 . As of December 2010 there were about 200.5 or 3. APK package contains . Detailed instructions for upgrading are available to those already working with an earlier release.dex files (compiled byte code files called Dalvik executables). Android Market Android Market is the online software store developed by Google for Android devices. a handset emulator (based on QEMU).Software Development Kit The Android software development kit (SDK) includes a comprehensive set of development tools. 3. and tutorials. Google announced the Android Market on 28 August 2008. Enhancements to Android's SDK go hand in hand with the overall Android platform development. documentation. Only devices that comply with Google's compatibility requirements are allowed to preinstall Google's closed-source Android Market app and access the Market. the Android Market was made fully accessible on the web. installing software package(s) remotely). etc. An application program ("app") called "Market" is preinstalled on most Android devices and allows users to browse and download apps published by third-party developers. with additional support from 29 countries on 30 September 2010. and it was available to users on 22 October 2008. The Market filters the list of applications presented by the Market app to those that are compatible with the user's device. Support for paid applications was available from 13 February 2009 for US and UK developers. with an estimated 2. Currently supported development platforms include computers running Linux (any modern desktop Linux distribution).9 or later. This release provided an updated and extended API.000 games. though developers may use any text editor to edit Java and XML files then use command line tools (Java Development Kit and Apache Ant are required) to create. The officially supported integrated development environment (IDE) is Eclipse (currently 3. On 18 August 2008 the Android 0. resource files.4.9 SDK beta was released. In February 2011. and developers may restrict their applications to particular carriers or countries for business reasons.g. Mac OS X 10.0 SDK (Release 1) was released. The SDK also supports older versions of the Android platform in case developers wish to target their applications at older devices. Windows XP or later.android. hosted on Android Market. improved development tools and an updated design for the home screen. These include a debugger. developer. Development tools are downloadable components.com. A preview release of the Android SDK was released on 12 November 2007.6) using the Android Development Tools (ADT) Plugin. The SDK is downloadable on the android developer website. so after one has downloaded the latest version and platform. or from alternative app markets. Product Perspective There are various reasons why should anyone use this program. Unlike Apple.pick up applications using their PCs. Users can install apps directly using APK files. it is an easy and reliable application that is very unique in its category bring robust and quick in execution alongwith multiple formatting options. Second. edit and store multiple text documents without much overhead for heavier applications. 3. And third due to its open source nature you can modify it according to your needs. send them to their mobile phone and make comments on them. All this functionality was previously accessible only from mobile phone devices. Google allows independent app stores to operate for Android. First its simple application where you can create. The major components of the system are: Home screen comprises of following components: 1) Filename Bar 2) Workspace for entering text Options Menu shows the following components: 1) New File 2) Save 3) Save As 4) Open 5) Recent With additional preferences for: Email Text Search Text Email As Attachment Options – o Line Wrap o Auto Correct o Sentence Case o Auto Link o Clear Search Suggestions o Default Directory o Clear Recent File List o Font o Font Size o Font Color o Background Color o Hide Filename Bar 12 . doc) Opening a file of any extension Search for text string in the text file Email the text as it is.g.4.3)] 7. External Interface Requirements User Interfaces The user when opens application for the first time is presented with the Home Screen. Operating Environment This program will operate in the following operating environment: [Android (ver. for the main modules.3) API (3.1.2. 4. User Documentation A user documentation is provided along with to enable the user understand the way the application works.rtf. 8) revision 4. . 2. Also the final application to be run on the phone requires the mobile to have at least 1 megabyte of phone memory to store the application and 600 MHz processor to run at good speed. 2.6.2. 1. or as an attachment Auto correct option History for previously opened files 5. User Classes and Characteristics User: He is the one who wants to edit text on his Android Phone System Actors: Android Text Editor 6. To compile the program Android SDK running under Eclipse IDE is used which requires a PC having at least 512 MB of RAM and CPU over 2 GHz to compile the application with good speed.5. 8. 1.txt. which consists of: Text editing space Title bar with the name of open file 13 . Product Features The major features this application contains are the following: Saving a file in your choice of extension (e. 9. Design and Implementation Constraints This application is created using Java programming language and uses the SDK Platform Android (1.6-2. . 7. . . ). Performance Requirements Performance: checking the fact that the system must perform as what every user expects. this application runs on any Android based phone irrespective of the manufacturer and Android OS version. In that case. a warning message pops up when replacing an existing file etc. the application saves the text automatically in the cache which is retrieved later when the application is used again. 10. there are no immediate delays. Software Quality Attributes Availability: Checking that the system always has something to function and always pop up error messages in case of some failure. 1.Hardware Interfaces There must be minimum storage space available to store the text files created (Phone internal memory. Other Nonfunctional Requirements Here we specify some nonfunctional constraints that the application satisfies in order to be more concrete and stable. So in every action-response of the system. Safety Requirements Consistency: checking the fact that there is no potential loss of the entered text at the time of accidental shutdown of application. 14 . SD card etc. 3. the application pops up error message when a wrong path is entered. In that case the error messages appear when something goes wrong so to prevail availability problems. In that case the system program reacts accordingly and transverses quickly between its states. Flexible service based architecture will be highly desirable for future extension 2. e. Usability: Checking that the system is easy to handle and navigates in the most expected way with no delays. Software Interfaces For the application to work the mobile can be any Android OS based phone. In that case. Portability: Checking that the application can be used on different mobile phones other than the one for which it was created without requiring major rework.g. Diagrams Use Case Diagram 15 . ER Diagram 16 . Data Flow Diagram 0-LEVEL DFD 17 . 1-LEVEL DFD 18 . Stimulus/Responses Precondition: The user selects the open file option by from the Menu. Stimulus/Responses Precondition: The user selects the save option from the screen. Post condition: The text on the screen can be edited. Functional requirements: Includes Req1.System Features Following are the major features provided by the application system: System Feature Create New File: Req 1 Description and Priority The user creates a new file to edit and save text. Post condition: File is displayed on the screen. Stimulus/Responses Precondition: The user selects the new file option from the Menu. 19 . Post condition: The file is saved. Functional requirements: Requires Req2. Extends Req3 System Feature Save File: Req3 Description and Priority The user saves a file. Functional requirements: None System Feature Open File: Req2 Description and Priority The user opens a file to edit text. Functional requirements: File should be created beforehand. Post condition: A new file is saved. 20 . Post condition: The control transfers to the Email application. Stimulus/Responses Precondition: The user selects the Email as Attachment option from the menu. Stimulus/Responses Precondition: The user selects the Email option from the menu. System Feature Email as Attachment: Req6 Description and Priority The user can send the file as an Email Attachment. Stimulus/Responses Precondition: The user selects the Save As option from the menu.System Feature Save As: Req4 Description and Priority The user can save the file with new file name. Post condition: The control transfers to the Email application. Functional requirements: File should be created and saved beforehand.. System Feature Email: Req5 Description and Priority The user can send the file as an Email. Functional requirements: Requires Req1 and Req2. Screenshots Welcome screen Menu 21 . Open File Dialog File Browser 22 . Save File Dialog Text Edit Preferences 23 . Open File Dialig Search Text 24 . 25 . No word processing capability No syntax highlighting 26 .Constraints GUI is only in English. com/android-sdk-install-guide/ 27 .com/ http://www.com/index.android.References http://www.com http://developer.talkandroid.google.html http://androidcommunity. 28 .Appendix Includes: Has the appropriate constraint in it Connects: Links this requirement with another Extends: Shows or cancels a constraint affect if the conditions are met.