You are on page 1of 29

Major Project on Android Text Editor

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

Acknowledgements

We are very grateful to my mentor Mr. Anshul Saini for providing me with his valuable support and time, for sharing his knowledge and guiding me throughout the project. I are also thankful to the Head Of Department (CS), Mr. Saurabh Gupta for allocating me such humble and enthusiastic mentor who were ready to help anytime.

Ankit Aggarwal Mohit Bansal Saurabh Sharma

0461562707 0521562707 0291562707

Table of Contents

1.

Abstract

. 4
. 4

Android Text Editor

2. 3.

Table of Figures ... 5 Introduction .. 5


Problem Statement Purpose Document Conventions ... 5 5 5 ..

Intended Audience and Reading Suggestions

.. 5

4. 5. 6.

Overview .. 6 References 6 Body of the report 7


Overall Description About Android OS Product Perspective Product Features . 7 ... 12 . 13 .. 13 13 13

User Classes and Characteristics Operating Environment

.. 13 Design and Implementation Constraints . 13 User Documentation External Interface Requirements Other Non-functional Requirements 13 ... 14 15 16

7.

Diagrams

.. 15

... Use Case Diagram .. ER Diagram Data Flow Diagram

. 17

8. 9. 10. 11. 12.

System Features ... Screenshots Constraints References Appendix ..

19 21 26 27 28

Abstract
Android Text Editor A text editor is a type of program used for editing plain text files. Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code. Typical features: String searching algorithm search string with a replacement string. Different methods are employed, Global(ly) Search And Replace, Conditional Search and Replace, Unconditional Search and Replace. Cut, copy, and paste most text editors provide methods to duplicate and move text within the file, or between files. Data transformation Reading or merging the contents of another text file into the file currently being edited. Some text editors provide a way to insert the output of a command issued to the operating system's shell. Ability to handle UTF-8 encoded text.

This project Android Text Editor is aimed at providing such facilities for a mobile platform, the Android OS. The application is designed to open, edit and save files of various types, viz. text files, C/C++, HTML, CSS or any other file based on the UTF-8 encoded text format.

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. 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. 2. Purpose The purpose of this document is to specify the requirements and preview some elements of the Android Text Editor. 3. 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. 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. In addition there are various figures that represent the described system, where it is needed, and serve only for better understanding of the deployment. 4. Intended Audience and Reading Suggestions This document is intended for any individual user, developer, tester, project manager or documentation writer that needs to understand the basic system architecture and its specifications. Here are the potential uses for each one of the reader types: Developer: The developer who wants to read, change, modify or add new requirements into the existing program, 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. 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. Tester: The tester needs this document to validate that the initial requirements of this programs actually corresponds to the executable program correctly.

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

Overview
1. Introduction: Provide an overview of the application, describe the document structure and point the individual objectives. 2. Overall Description: Provide the specification of the system model, the classes model, the main constraints and the list any assumed factors that used within this document. 3. System Features: Provide the analysis of the requirements by feature. 4. External Interface Requirements: Provide the visualization of the program and the requirements that are related with hardware, software and networking. 5. Other Nonfunctional Requirements: Provide some other constraints that apply to factors such as performance, safety and security.

References
This citation is used as a model of reference: [IEEE STD 830-1998]

Body Of The Report


1. Overall Description
Feasibility of the project The feasibility of the product is a question that confirms the reality to the ideas. 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. The cost of making the software is negligible as compared to cost of maintaining it. The cost for maintaining the software is very high as the records to be maintained are of huge size and therefore acquire more space, also the records are very critical therefore the backup will also be required which would lead to increase in the cost of its maintenance. 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. The technical feasibility is high as the software is coded in .JAVA which is a platform independent language and therefore can be installed on any computer. 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. RESOURCE FEASIBILITY: The resources have to be acquired by the company for deploying the software.

2. About Android OS
Android is a software stack for mobile devices that includes an operating system, middleware and key applications. Android's mobile operating system is based on a modified version of the Linux kernel. The Android open-source software stack consists of Java applications running on a Java-based, object-oriented application framework on top of Java core libraries running on a Dalvik virtual machine featuring JIT compilation. Libraries written in C include The surface manager, OpenCore media framework, SQLite RDBMS, OpenGL ES 2.0 3D graphics API, WebKit layout engine, SGL graphics engine, SSL, and Bionic libc.

The Android operating system consists of 12 million lines of code including 3 million lines of XML, 2.8 million lines of C, 2.1 million lines of Java, and 1.75 million lines of C++. Google Inc. purchased the initial developer of the software, Android Inc., in 2005. Google and other members of the Open Handset Alliance collaborated on Android's development and release. The Android Open Source Project (AOSP) is tasked with the maintenance and further

development of Android. The Android operating system is the world's best-selling Smartphone platform. Android has a large community of developers writing applications ("apps") that extend the functionality of the devices. There are currently over 150,000 apps available for Android. Android Market is the online app store run by Google, though apps can also be downloaded from third party sites. Developers write primarily in the Java language, controlling the device via Google-developed Java libraries. The unveiling of the Android distribution on 5 November 2007 was announced with the founding of the Open Handset Alliance, a consortium of eighty hardware, software, and telecom companies devoted to advancing open standards for mobile devices. Google released most of the Android code under the Apache License, a free software and open source license.

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. Our vision is that the powerful platform we're unveiling will power thousands of different phone models."
-Eric Schmidt, former Google Chairman/CEO

On the November 5, 2007 the Open Handset Alliance unveiled itself, 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. On the same day, the Open Handset Alliance also unveiled their first product, Android, a mobile device platform built on the Linux kernel version 2.6. On December 9, 2008, 14 new members joined, including ARM Holdings, Atheros Communications, Asustek Computer Inc, Garmin Ltd, PacketVideo, Softbank, Sony Ericsson, Toshiba Corp, and Vodafone Group Plc.

Licensing
With the exception of brief update periods, Android has been available under a free software/open source license since 21 October 2008. Google published the entire source code (including network and telephony stacks) under an Apache License. Google also keeps the reviewed issues list publicly open for anyone to see and comment.

Even though the software is open-source, device manufacturers cannot use Google's Android trademark unless Google certifies that the device complies with their Compatibility Definition Document (CDD). Devices must also meet this definition to be eligible to license Google's closed source applications, including Android Market.

Version history
Android has seen a number of updates since its original release. These updates to the base operating system typically focus on fixing bugs as well as adding new features. Generally each new version of the Android operating system is developed under a code name based on a dessert item. The most recent released versions of Android are: 2.0/2.1 (Eclair), which revamped the user interface and introduced HTML5 and Exchange ActiveSync 2.5 support 2.2 (Froyo), which introduced speed improvements with JIT optimization and the Chrome V8 JavaScript engine, and added Wi-Fi hotspot tethering and Adobe Flash support 2.3/2.4 (Gingerbread), which refined the user interface, improved the soft keyboard and copy/paste features, and added support for Near Field Communication 3.0 (Honeycomb), a tablet-oriented release which supports larger screen devices and introduces many new user interface features, and supports multicore processors and hardware acceleration for graphics.

The Honeycomb SDK has been released and the first device featuring this version, the Motorola Xoom tablet, went on sale in February 2011. Google has chosen to withhold the source code for the time being, which calls into question the "open-ness" of this Android release. Google claims this is done to eliminate manufacturers putting a tablet-specific OS on phones, much like the previous autumn, where tablet manufacturers put a non-tablet optimized phone OS (Android 2.x) on their Tablets resulting in bad user experiences. The upcoming version of Android is: Ice Cream, a combination of Gingerbread and Honeycomb into a "cohesive whole," with a possible release in mid-2011

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, netbooks and tablets, including the Dell Streak, Samsung Galaxy Tab, TV and other devices. The first commercially available phone to run the Android operating system was the HTC Dream, released on 22 October 2008. In early 2010 Google collaborated with HTC to launch its flagship Android device, the Nexus One. This was followed later in 2010 with the Samsung-made Nexus S.

10

Software Development Kit


The Android software development kit (SDK) includes a comprehensive set of development tools. These include a debugger, libraries, a handset emulator (based on QEMU), documentation, sample code, and tutorials. The SDK is downloadable on the android developer website, developer.android.com. Currently supported development platforms include computers running Linux (any modern desktop Linux distribution), Mac OS X 10.4.9 or later, Windows XP or later. The officially supported integrated development environment (IDE) is Eclipse (currently 3.4, 3.5 or 3.6) using the Android Development Tools (ADT) Plugin, 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, build and debug Android applications as well as control attached Android devices (e.g., triggering a reboot, installing software package(s) remotely). A preview release of the Android SDK was released on 12 November 2007. On 18 August 2008 the Android 0.9 SDK beta was released. This release provided an updated and extended API, improved development tools and an updated design for the home screen. Detailed instructions for upgrading are available to those already working with an earlier release. On 23 September 2008 the Android 1.0 SDK (Release 1) was released. Enhancements to Android's SDK go hand in hand with the overall Android platform development. The SDK also supports older versions of the Android platform in case developers wish to target their applications at older devices. Development tools are downloadable components, so after one has downloaded the latest version and platform, older platforms and tools can also be downloaded for compatibility testing. Android applications are packaged in .apk format and stored under /data/app folder on the Android OS (the folder is accessible to root user only for security reasons). APK package contains .dex files (compiled byte code files called Dalvik executables), resource files, etc.

Android Market
Android Market is the online software store developed by Google for Android devices. 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, hosted on Android Market. As of December 2010 there were about 200,000 games, applications and widgets available on the Android Market, with an estimated 2.5 billion total downloads. 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 Market filters the list of applications presented by the Market app to those that are compatible with the user's device, and developers may restrict their applications to particular carriers or countries for business reasons. Google announced the Android Market on 28 August 2008, and it was available to users on 22 October 2008. Support for paid applications was available from 13 February 2009 for US and UK developers, with additional support from 29 countries on 30 September 2010. In February 2011, the Android Market was made fully accessible on the web, allowing users to browse and

11

pick up applications using their PCs, send them to their mobile phone and make comments on them. All this functionality was previously accessible only from mobile phone devices. Users can install apps directly using APK files, or from alternative app markets. Unlike Apple, Google allows independent app stores to operate for Android.

3. Product Perspective
There are various reasons why should anyone use this program. First its simple application where you can create, edit and store multiple text documents without much overhead for heavier applications. Second, it is an easy and reliable application that is very unique in its category bring robust and quick in execution alongwith multiple formatting options. And third due to its open source nature you can modify it according to your needs. 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

4. Product Features
The major features this application contains are the following: Saving a file in your choice of extension (e.g. .txt, .rtf, .doc) Opening a file of any extension Search for text string in the text file Email the text as it is, 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. Operating Environment
This program will operate in the following operating environment: [Android (ver. 1.6-2.3)]

7. Design and Implementation Constraints


This application is created using Java programming language and uses the SDK Platform Android (1.5, 1.6, 2.1, .2.2, 2.3) API (3, 4, 7, 8) revision 4, for the main modules. 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. 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.

8. User Documentation
A user documentation is provided along with to enable the user understand the way the application works.

9. External Interface Requirements


User Interfaces The user when opens application for the first time is presented with the Home Screen, which consists of: Text editing space Title bar with the name of open file

13

Hardware Interfaces
There must be minimum storage space available to store the text files created (Phone internal memory, SD card etc.).

Software Interfaces
For the application to work the mobile can be any Android OS based phone.

10. Other Nonfunctional Requirements


Here we specify some nonfunctional constraints that the application satisfies in order to be more concrete and stable. 1. Performance Requirements Performance: checking the fact that the system must perform as what every user expects. So in every action-response of the system, there are no immediate delays. Flexible service based architecture will be highly desirable for future extension 2. Safety Requirements Consistency: checking the fact that there is no potential loss of the entered text at the time of accidental shutdown of application. In that case, the application saves the text automatically in the cache which is retrieved later when the application is used again. 3. Software Quality Attributes Availability: Checking that the system always has something to function and always pop up error messages in case of some failure. In that case the error messages appear when something goes wrong so to prevail availability problems, e.g. the application pops up error message when a wrong path is entered, a warning message pops up when replacing an existing file etc. Usability: Checking that the system is easy to handle and navigates in the most expected way with no delays. In that case the system program reacts accordingly and transverses quickly between its states. 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. In that case, this application runs on any Android based phone irrespective of the manufacturer and Android OS version.

14

Diagrams
Use Case Diagram

15

ER Diagram

16

Data Flow Diagram

0-LEVEL DFD

17

1-LEVEL DFD

18

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. Stimulus/Responses Precondition: The user selects the new file option from the Menu. Post condition: The text on the screen can be edited. Functional requirements: None

System Feature Open File: Req2


Description and Priority The user opens a file to edit text. Stimulus/Responses Precondition: The user selects the open file option by from the Menu. Post condition: File is displayed on the screen. Functional requirements: Includes Req1; Extends Req3

System Feature Save File: Req3


Description and Priority The user saves a file. Stimulus/Responses Precondition: The user selects the save option from the screen. Post condition: The file is saved. Functional requirements: Requires Req2.

19

System Feature Save As: Req4


Description and Priority The user can save the file with new file name. Stimulus/Responses Precondition: The user selects the Save As option from the menu. Post condition: A new file is saved.. Functional requirements: Requires Req1 and Req2.

System Feature Email: Req5


Description and Priority The user can send the file as an Email. Stimulus/Responses Precondition: The user selects the Email option from the menu. Post condition: The control transfers to the Email application. Functional requirements: File should be created beforehand.

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 Email as Attachment option from the menu. Post condition: The control transfers to the Email application. Functional requirements: File should be created and saved beforehand.

20

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

Constraints
GUI is only in English. No word processing capability No syntax highlighting

26

References

http://www.google.com http://developer.android.com/index.html http://androidcommunity.com/ http://www.talkandroid.com/android-sdk-install-guide/

27

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.

28