Вы находитесь на странице: 1из 76

1

CHAPTER 1
INTRODUCTION

1.1 ABOUT THE PROJECT
Status Representation for Message Using Android Application is an
application shows the message status for the receiver message that whether the
message is viewed by the user or not. A person can send a SMS from the application
and can also able to view the unread SMS from the application.
The mobile phone users are increase day by day and everyone wants to develop
new things which is improved version of existing one. The SMS user might want the
faster SMS technology which can convert their voice into text through the Google
voice recognition API and SMS will be transferred.
This project based on evaluating voice versus keypad as a means for entry and
editing of texts. In other words, we can say messages can be voice/speech typed. It is
found that large-vocabulary speech recognition can offer a very competitive alternative to
traditional text entry.
In this application we will receive the SMS from the person with the help of
broadcast receiver. The SMS can be received in this application itself, whenever an incoming
SMS comes from other person.
It has additional feature of viewing status of the SMS send by the person. If the
receiver views the message then the status of the SMS is send programmatically to the
sender with the particular SMS substring of 30 character along with the SMS status. Thus,
the sender know about the particular SMS is being viewed by the receiver.

2

CHAPTER 2
LITERATURE REVIEW
2.1 LITERATURE REVIEW
Literature survey is the documentation of a comprehensive review of the
published and unpublished work from secondary sources data in the areas of specific
interest to the researcher.
M. Tomalin, F. Diehl, M.J.F. Gales, J. Park & P.C. Woodland, Recent
Improvements To The Cambridge Arabic Speech-To-Text Systems, I CASSP
2010 pp 4382-4385
This paper describes recent improvements to the Cambridge Arabic Large
Vocabulary Continuous Speech Recognition (LVSCR) Speech-to-Text (STT) system. It
is shown that Multi-Layer Perceptron (MLP) features trained on phonetic targets can
improve the performance of both phonemic and graph emic systems. Also, a
morphological decomposition scheme is extended from the graph emic domain to the
phonetic domain, and particular attention is given to the task of dictionary generation.
Finally, the use of Boosted Maximum Mutual Information (BMMI) training is explored
both for individual systems and in the context of system combination. The full system
results show that the combined use of the above techniques reduces the Word Error Rate
(WER) of the best individual system by up to 12% relative, and that the incorporation of
morphological decomposition and BMMI within the four individual branches of the
combined system reduces the WER by up to 9% relative.
Ryuichi Nisimura, Jumpei Miyake, Hideki Kawahara and Toshio Irino,
Speech-To-Text Input Method For Web System Using Javascript, I EEE SLT
2008 pp 209-212
We have developed a speech-to-text input method for web systems. The system is
provided as a JavaScript library including an Ajax-like mechanism based on a Java
applet, CGI programs, and dynamic HTML documents. It allows users to access voice-
enabled web pages without requiring special browsers. Web developers can embed it on
3

their web page by inserting only one line in the header field of an HTML document. This
study also aims at observing natural spoken interactions in personal environments. We
have succeeded in collecting 4,003 inputs during a period of seven months via our public
Japanese ASR server. In order to cover out-of-vocabulary words to cope with some
proper nouns, a web page to register new words into the language model are developed.
As a result, we could obtain an improvement of 0.8% in the recognition accuracy. With
regard to the acoustical conditions, an SNR of 25.3 dB was observed.
Panikos Heracleous, Hiroshi Ishiguro and Norihiro Hagita, Visual-
speech to text conversion applicable to telephone communication for deaf
individuals
18
th
I nternational Conference on Telecommunication
2011. pp 130-133
The access to communication technologies has become essential for the
handicapped people. This study introduces the initial step of an automatic translation
system able to translate visual speech used by deaf individuals to text, or auditory speech.
A such a system would enable deaf users to communicate with each other and with
normal-hearing people through telephone networks or through Internet by only using
telephone devices equipped with simple cameras. In particular, this paper introduces
automatic recognition and conversion to text of Cued Speech for French. Cued speech is
a visual mode used for communication in the deaf society. Using hand shapes placed in
different positions near the face as a complement to lipreading, all the sounds of a spoken
language can be visually distinguished and perceived. Experimental results show high
recognition rates for both isolated word and continuous phoneme recognition experiments
in Cued Speech for French.
Y.Liu, E.Shriberg, A.Stolcke, D.Hillard, M.Ostendorf, and M.Harper,
Enriching speech recognition with automatic detection of sentence boundaries
and disfluencies, I EEE Trans. Audio, Speech, Lang. Process., vol. 14, no. 5,
pp. 15241538, Sep. 2006.
Effective human and automatic processing of speech requires recovery of more
than just the words. It also involves recovering phenomena such as sentence boundaries,
filler words, and disfluencies, referred to as structural metadata. We describe a metadata
4

detection system that combines information from different types of textual knowledge
sources with information from a prosodic classifier. We investigate maximum entropy
and conditional random field models, as well as the predominant hidden Markov model
(HMM) approach, and find that discriminative models generally outperform generative
models. We report system performance on both broadcast news and conversational
telephone speech tasks, illustrating significant performance differences across tasks and
as a function of recognizer performance. The results represent the state of the art, as
assessed in the NIST RT-04F evaluation.













5

CHAPTER 3
PROBLEM DEFINITION
3.1 PROBLEM DEFINITION
While many Android SMS application can only able to send and receive SMS at a
time. Using Google voice recognition API and SMS will be transferred. Thus, many
problems had difficulty making their products interoperable. Existing system dont have
any SMS status feature for opened SMS.
3.1.1 EXISTING SYSTEM
In the existing system, Android SMS application does not have any status features
for the SMS opened in order to identify that the end user is viewing the particular SMS
currently.
DRAWBACK OF EXISTING SYSTEM
Seen SMS status, along with the prefix of SMS information 30 character can be
send to sender.
Unseen important SMS can be viewed on time.
Prevent cheating / fraud activities by SMS viewing status.
3.1.2 PROBLEM RECOGINIZATION
The Android SMS application refer to the information send and receive to the
user, the existing system enable the feature and technology being developed, the various
task such as application to develop the android apps. The application to develop for SMS
status Representation using android. It commonly known as SMS Opened Status
Representation system. Once the user send the SMS to other user, he / she can able to
know about the SMS viewing status along the 30 character prefix of the SMS being send
to the particular user when he / she opens.
6

3.1.3 PROPOSED SYSTEM
This is a SMS status Representation for Android application being developed to
know the SMS status of the opened message either viewed or unseen by the user along
with the prefix 30 character of the SMS being send to the particular user.
3.2 FEATURES
The Proposed System has been developed with the certain features which more
help for the users,
Converting Speech to Text
Display Open status of the SMS
3.3 OVERALL GOALS
The Overall goals of our project is to allow the users to access a well-versed SMS
application. The new application addresses the problems to avoid the important unread
SMS. And also to assure the SMS has been viewed on right time by the person.








7

CHAPTER 4
SOFTWARE REQUIREMENT SPECIFICATION
4.1 INTRODUCTION
An SRS is basically an organizations understanding (in writing) of a customer or
potential clients system requirements and dependencies at a particular point in time
(usually) prior to any actual design or development work. Software Requirement
Specification has been developed for future reference in case of any ambiguity and
misunderstanding. SRS provides a detailed description of the requirement, behaviors,
constraints and performance of the system.
4.2 REQUIREMENT ANALYSIS
Requirement Analysis is for transformation of operational need into software
description, software performance parameter, and software configuration through use of
standards, iterative process of analysis and trade off studies for understanding what the
customer wants, analysis need, assessing feasibility, negotiating a reasonable solution,
validation the specification, and managing the requirements.
4.2.1 PURPOSE
The purpose of this document is to have review, to ensure that the developer and
the customer have the same perception of the system. This document is an agreement
made between the customers and the software developers/designers concerning about the
functional and the nonfunctional requirements that the software system should reveal. In
addition, it will also provide the specific requirements and functionality needed for this
project- such as interface, functional requirements and performance requirements.
4.2.2 SCOPE
The scope of this Software Requirement Specification states that the goals and
objectives of the software describing it in the context of the computer based systems.
8

This document is used to throughput the project life cycle right from the inception to the
final stage of implementation. This statement defines the requirement of the systems,
function and non-functional, by the users and developers. It is referred as in case any
ambiguities or confusion arise, the developer is responsible for asking clarification
whenever necessary and wont make any alterations without the permission of the client.
4.2.3 OVERVIEW
The Software Requirement Specification document for the system covers the
following two sections,
General Descriptions It provides the general description about the
project. It includes description about the product function, user
characteristics and general constraints.
Specification Requirements This section describes about both the
functional and non-functional requirements of the system.
The Functional Requirements section defines the system
requirement specification from functionalities point view.
The Non-Functional Requirements section defines the systems
external interface, general requirements, performance, design
constraints, etc. which are dealt with detail in corresponding sub-
sections.
4.2.4 GENERAL DESCRIPTIONS
The general description provides an overview about the functional areas of the
project, which we are developed. This section describes the general functionality desired
in common terms. It describes product perspectives, product function, users
characteristics, general constraints and all the assumptions and dependencies.
Information content flow and structure are also documented.
9

4.2.4.1 PRODUCT FUNCTION
The project is guaranteed to provide reliable results and the functionality of the
product is to give a wide range of flexibility to the user in a secured and accurate way.
The user interface is provided in terms of various modules for the users.
4.2.4.2 USER CHARACTERISTICS
The user of the project have some basic knowledge to operate the android mobile
application and also able to follow the system instruction which is English. The important
thing is that he should be administrator to benefit the all feature in the application being
present.
User
User can install this application then run similar operating system phone this
application on android mobile device can send and receive the SMS along with the status
of the SMS information.
4.2.4.3 GENERAL CONSTRAINTS
The general description provides an overview about the functional areas of the
project, which we are developed. This section describes the general functionality desired
in common terms. It describes product perspectives, product function, users
characteristics, general constraints and all the assumptions and dependencies.
Information content flow and structure are also documented.
The product runs only on Android operating system.
There is no hardware limitation.
The user must know how to operate android mobile devices.



10

4.2.5 FUNCTIONAL REQUIREMENTS
Functional requirement are expressed in relational and state oriented notation that
specify relationships among inputs, actions and output in the applications. In this system
services such as reliability, performance, availability, usability, adaptability and
extensibility.
4.2.5.1 TECHNICAL ISSUES
Safe external access
Updating new application and functionality
4.2.5.2 RISK ANALYSIS
Risks are potential problems that might affect the successful completion of a
software project. The risk of using this product is that if the system is already optimized
with some other tool then there is a chance of system crash. If this product is used in
their operating system some functionality may work properly and some may not have
taken all the common features from its parent OS. Once the system is crashed due to
wrong usage of this tool then it is not possible to work without reinstalling the whole
system again.

I used Spiral Model for the Risk Analysis, in that I analyzed the risks before
starting each and every module from the client.
Gather information of current existing systems.
Design the flow of the application. How it is going to function.
Design the interface of the application.
Code a simple SMS application.
Further enhance the application with more functions.
Combine everything up and test runs it to ensure no bug and error.
Test the application on different types of mobile phones. Find out the OS needed
to get all the functions working. Try to further improve the system if possible
11

4.2.6 INTERFACE REQUIREMENTS
This system defines interaction modes in a way that does not force a user into
undesired actions. The user can access the system with little or no effort through the
software. The flexible different interaction preference can be specified in the hardware
equipment. For the support of good interface a system should have the hardware and
software equipment.

4.2.6.1 HARDWARE REQUIREMENTS
Processor : Dual Core
RAM : 1 GB
Hard disk : 120 GB and above
Monitor : 14 inch
Keyboard : Standard Keyboard
Mouse : Optical Mouse

4.2.6.2 SOFTWARE REQUIREMENTS
Operating System : Windows, Android
Tools : Android Development Kit, Eclipse
Virtual Machine : Android (2.3)




12

CHAPTER 5
OBJECT ORIENTED ANALYSIS
5.1 ELEMENTS OF ANALYSIS MODEL
An object contains encapsulated data and procedures grouped together to represent
an entity. The 'object interface', how the object can be interacted with, is also defined. An
object-oriented program is described by the interaction of these objects. Object-oriented
design is the discipline of defining the objects and their interactions to solve a problem that
was identified and documented during object-oriented analysis. It generates models of the
problem domain classes like the Use case, Sequential, Activity and Class diagram that are
present in the system.

5.1.1 USE CASES AND USE CASE DIAGRAM
A use case diagram in the Unified Modeling Language (UML) is a type of
behavioral diagram defined by and created from a Use-case analysis. Its purpose is to
present a graphical overview of the functionality provided by a system in terms of actors,
their goals (represented as use cases), and any dependencies between those use cases. The
main purpose of a use case diagram is to show what system functions are performed for
which actor.

13


The Use case diagram is used to define the core elements and processes that make
up a system. The key elements are termed as "actors" and the processes are called "use
cases." The Use case diagram shows which actors interact with each use case.
OVERALL USECASE DIAGRAM FOR SYSTEM
USECASE : Overall Process
DESCRIPTION: The figure 4.1 shows the overall system

Fig.: 5.1 Overall Use case Diagram
USE CASE DESCRIPTION
Compose SMS The Sender / Receiver can create / compose new SMS
Send SMS The Sender / Receiver can send an SMS
Receive SMS The Sender / Receiver receive an SMS
View SMS The Sender / Receiver can view unread SMS
View SMS Open Status The Sender can identify unread SMS status

14

USECASE DIAGRAM FOR SENDER MODULE
USECASE : Sender Module
ACTOR : Sender (User)
DESCRIPTION: The figure 4.2 shows the operations of sender module

Fig.:5.2 Use Case Diagram For Sender Module
USE CASE DESCRIPTION
Compose SMS The Sender can create / compose new SMS
Send SMS The Sender can send an SMS
Receive SMS The Sender receive an SMS
View SMS The Sender can view unread SMS
View SMS Open Status The Sender can identify unread SMS status
15

USECASE DIAGRAM FOR RECEIVER MODULE
USECASE : Receiver Module
ACTOR : Receiver (User)
DESCRIPTION: The figure 4.3 shows the operations of receiver module


Fig.:5.3 Use Case Diagram For Receiver Module
USE CASE DESCRIPTION
Compose SMS The Receiver can create / compose new SMS
Send SMS The Receiver can send an SMS
Receive SMS The Receiver receive an SMS
View SMS The Receiver can view unread SMS

16

5.1.2 SEQUENCE DIAGRAM
A sequence diagram models a dynamic view of the interaction between model
elements at run time. Sequence diagrams are commonly used as explanatory model for
use case scenario.
An actor element may be used to represent the user initiating the flow of events.
Stereotyped elements, such as boundary, control and entity may be used to illustrate
screens, controller items respectively.
OVERALL SEQUENCE DIAGRAM OF THE SYSTEM

Fig.:5.4 Overall Sequence Diagram
The figure 5.4 illustrates the overall sequence diagram of overall system. Sender,
Associate, Receiver attribute for evaluation of a process.

17

5.1.3 ACTIVITY DIAGRAM
Activity diagrams are used to model the behavior of the system and the way in
which the behaviors are related in the overall flow of the system. The activity diagram
depicts the logical path, process flow based on various conditions which are used to
construct a process, system or procedure.

Fig.:5.5 Overall Activity Diagram
The figure 5.5 illustrates the overall activity diagram of the system. User can Send
and Receive / View the SMS through the application.
18

5.1.4 ENTITY RELATIONSHIP DIAGRAM
Entity Relationship (ER) diagram is a graphical representation of entities and their
relationships to each other, typically used in computing in regard to the organization
of data within databases or information systems. An entity is a piece of data-an object or
concept about which data is stored. A relationship is how the data is shared between
entities. There are three types of relationships between entities:
One-to-one: one instance of an entity (A) is associated with one other instance of
another entity (B). For example, in a database of employees, each employee name (A) is
associated with only one social security number (B).
One-to-many: one instance of an entity (A) is associated with zero, one or many
instances of another entity (B), but for one instance of entity B there is only one instance
of entity A. For example, for a company with all employees working in one building, the
building name (A) is associated with many different employees (B), but those employees
all share the same singular association with entity A.
Many-to-many: one instance of an entity (A) is associated with one, zero or
many instances of another entity (B), and one instance of entity B is associated with one,
zero or many instances of entity A. For example, for a company in which all of its
employees work on multiple projects, each instance of an employee (A) is associated
with many instances of a project (B), and at the same time, each instance of a project (B)
has multiple employees (A) associated with it.

Building Blocks of ER Diagram
Entity: an object that is involved in the enterprise and that be distinguished from other
objects. (Not shown in the ER diagram--is an instance). It can be physical object or
abstraction
Entity Type: set of similar objects or a category of entities; they are well defined.
Attribute: describes one aspect of an entity type; usually [and best when] single valued
and indivisible (atomic)
19

May be multi-valued use double oval on E-R diagram
May be composite attribute has further structure; also use oval for composite
attribute, with ovals for components connected to it by lines
May be derived a virtual attribute, one that is computable from existing data in
the database, use dashed oval. This helps reduce redundancy
Symbols for ER Diagram
Entity rectangle
Attribute oval
Relationship diamond
Link line


Fig. 5.6: Over All Entity Relationship diagram

The figure 5.6 represents the Overall Entity Relationship diagram for SMS
application, which shows the various attributes or fields of an entity and the relationship.


20

CHAPTER 6
OBJECT ORIENTED DESIGN
Object-oriented design is a design strategy where system designers think in terms
ofThings instead of operations or functions. The executing system is made up
ofinteracting objects that maintain their own local state and provide operations on
thatstate information .They hide information about the representation ofthe state and
hence limit access to it. An object-oriented design process involvesdesigning the object
classes and the relationships between these classes.
Object-oriented design is part of object-oriented developmentwhere anobject-
oriented strategy is used throughout the development process:
Object-oriented analysisis concerned with developing an object-oriented model
of the application domain. The identified objects reflect entities and operations
that are associated with the problem to be solved.
Object-oriented designis concerned with developing an object-oriented model of
a software system to implement the identified requirements. The objects in an
object-oriented design are related to the solution to the problem that is being
solved. There may be close relationships between some problem objects and some
solution objects but the designer inevitably has to add new objects and to
transform problem objects to implement the solution.
Object-oriented programmingis concerned with realizing a software design
using an object-oriented programming language. An object-oriented programming
language, such as Java, supports the direct implementation of objects and
provides facilities to define object classes.
Objects are potentially reusable components because they are
independentencapsulations of state and operations. Designs can be developed using
21

objects thathave been created in previous designs. This reduces design, programming
andvalidation costs.
6.1 ARCHITECTURE DESIGN
Service oriented architecture is a very popular architecture paradigm for designing
and developing distributed system. It is as information technology approach in which
applications make use of services available in a network such as the world wide web.
It is an architectural style where system consist of service consumers and service
providers. An architecture style defines a vocabulary of components and connectors
type and constraints on how they can be connected.

Admin




User

Fig:6.1Software architecture describes a systems components and connectors.
Basic component types are
o Service users
o Service provider
Auxiliary component types are
o Enterprise service bus
o Directory service
SOA connector types are

External Metrics Module
Internal Metrics Module
System Metrics Module
Derived Metric Module
.NET
Framework
3.5
22

o Synchronous calls
o Asynchronous calls
The constraints that apply to the SOA architectural style are
a) service providers register their services in UDDI registry
b) service consumers can dynamically discover required services in a directory of
services
c) once a required service is found , the service consumer can bind the service into
its application
An ESB can mediate the interaction between service consumers and service Providers

Fig: 6.1.1: The find-bind execute paradigm.
Service Provider
The service provider is the service, the network-addressable entity that accepts
and executes requests from consumers. It can be a mainframe system, a component ,or
some other type of software system that executes the service request. The service
provider publishes its contract in the registry for access by service consumers.
Service Consumer
23

The service consumer is an application, service, or some other type of software
module that requires a service. It is the entity that initiates the locating of the service in
the registry, binding to the service over a transport, and executing the service function.
Service Registry
A service registry is a network-based directory that contains available services. Itis an
entity that accepts and stores contracts from service providers and provides those
contracts to interested service consumers.
Service Contract
A contract is a specification of the way a consumer of a service will interact with the
provider of the service. It specifies the format of the request and response from the
service. A service contract may require a set of preconditions and postconditions. The
preconditions and postconditions specify the state that the service must be in to execute a
particular function. The contract may also specify quality of service (QOS) levels. QOS
levels are specifications for the non functional aspects of the service. For instance, a
quality of service attribute is the amount of time it takes to execute a service method.
24


Fig: 6.1.2: The Quality attribute metrics paradigm
6.3 USER INTERFACE DESIGN
The goal of user interface design is to make the user's interaction as simple and
efficient as possible, in terms of accomplishing user goals what is often called user-
centered design. Good user interface design facilitates finishing the task at hand without
drawing unnecessary attention to it. Graphic design may be utilized to support its usability.
25


Fig: 5.3 user-interface design










26

CHAPTER 7
IMPLEMENTATION
7.1 IMPLEMENTATION DETAILS
The proposed model identifies metrics to evaluate design quality in the design
phase, giving organizations a chance to find and repair problems before they find their
way into the working system and save large amount of potential expenditure for problem
resolution. The proposed model is validated by its application to an information
management system to verify its correctness in deducing the correct set of metrics for
estimating the changes to system design.
7.1.1 Service Internal Metrics Module
The service internal metrics use service internal elements such as service name,
operations provided by the service, and characteristics of the messages defined in the
service. This module computes Number of operations, Numbers of Fine-grained
Parameter Operations, Number of Messages used, Number of Asynchronous operations,
Number of synchronous operations, Number of Inadequately Named operations in the
given services
Number of operations is used to measure complexity and is adapted from
number of methods metric in OO systems. Cohesion is a property which implies the
degree of relationships between operations defined in a service, and is measured by the
metric defined as average used message factor. This metric is inversely proportional to
the average number of messages in a service because smaller number of messages.
Since the fine-grained service is defined that the service which perform single
function, it is assumed that fine-grained parameter operations are operations which are
having single parameter. Number of message is calculated by addition of total number
of producer services and total number of consumer services.
27

Web Service operations can be either synchronous request-response or
asynchronous one-way. Synchronous request-response (the default behavior) means that
every time a client application invokes a Web Service operation, it receives a SOAP
response Asynchronous one-way means that the client never receives a SOAP response,
even a fault or exception.
When designing asynchronous one-way Web Service operations,
The backend component that implements the operation must explicitly return
void.
You cannot specify out or in-out parameters to the operation, you can only specify
in parameters.
So that the operation which have return type are assumed as synchronous
operations. and the operation which have return type as void are assumed as
asynchronous operations. All the constructors and destructors are assumed as
Inadequately Named Operations
7.1.2 Service External Metrics Module
The External metrics use information from services it is connected to. Metrics in
this group are used to measure the characteristics of consumer and producer services
either directly or indirectly connected to a given service.
This module computes Number of Consumers in same level, Number of directly
connected producer services, Number of directly connected consumer services, Total
number of provider services, total number of consumer services in the system.
The Service Composition Diagram is shown in figure 6.1. It shows connection
between different number of services in a file.
28


Figure 7.1: Service Composition Diagram

Number of Directed connected Consumer Services NDCS(A)= 2 (F&C)
Number of Directed connected Producer Services NDPS(A)= 2 (B&D)
Total number of Producer Services NTPS(A)= 5 (B,D ,E,F,C)
Total number of Consumer Services NTCS(A) =4 (F,C,H,G)

7.1.3 System Metrics Module
The last group, system metrics, measures the characteristics of the entire system
in general.
System metrics are
SM SSNS : System Size in Number of Services
SM NINS : Number of Inadequately Named Services
SM NINO : Number of Inadequately Named Operations
SM TMU : Total Number of Message Used
29

SM NAO : Number of Asynchronous Operations
SM NSO : Number of Synchronous Operations
SM NFPO : Number of Fine-Grained Parameter Operations
SM NPS : Number of Process Services
SM NIS : Number of Intermediary Services
SM NBS : Number of Basic Services
7.1.4 Derived Metrics Module
The fourth group of metrics make use of the three previously defined metrics
groups and are therefore referred to as derived metrics.
This module computes coupling, cohesion, complexity, design size, service
granularity, parameter granularity, consumability
Coupling(Average number of directly connected services(DM_ADCS)=
SEM_NDPS+SEM_NDCS/SM_SSNS
Cohesion(Inverse of Average number of Used Message(DM_IAUM)=
SM_SSNS/SM_TMU
Complexity(Number of Operations(DM_NO))=SM_NSO+SM_NAO*1.5
Design Size(Number of Services(NS))=SM_SSNS
Service Granularity(Squared Avg. Number of Operations to squared Avg. Number of



30

Messages(DM_AOMR)= SM_NAO+SM_NSO 2
SM_SSNS
SM_TMU 2
SM_SSNS

Parameter Granularity(Coarse-Grained parameter ratio(DM_CPR)=
(SM_NSO+SM_NAO-SM_NFPO)/(SM_NSO+SM_NAO)
7.1.5 Quality Attribute Factor Computation Module
This module computes the quality factors such as Effectiveness,
Understandability, Flexibility, Reusability, Discoverability

Effectiveness = 0.33 * Cohesion + 0.33 * Service Granularity + 0.33 * Parameter
Granularity
Understandability = -0.66 * Coupling + 0.25 * Cohesion -0.66 * Complexity -
0.66 * Design Size +0.25 * Service Granularity +
0.25 * Parameter Granularity + 0.25 * Consumability
Flexibility = -0.22 * Coupling + 0.61 * Service Granularity + 0.61 * Parameter
Granularity
Reusability = -0.5 * Coupling + 0.5 * Cohesion + 0.5 * Service Granularity + 0.5
* Consumability
Discoverability = 0.5 * Service Granularity + 0.5 * Parameter Granularity


31

CHAPTER 8
TESTING
8.1 INTRODUCTION
Testing is the process of executing a program or system with the intent of finding
errors. Or, it involves any activity aimed at evaluating an attribute or capability of a
program or system and determining that it meets its required results. Software is not unlike
other physical processes where inputs are received and outputs are produced. Where
software differs is in the manner in which it fails. Most physical systems fail in a fixed (and
reasonably small) set of ways. By contrast, software can fail in many bizarre ways.
Detecting all of the different failure modes for software is generally infeasible.

8.2 TEST PLAN
The first step in system testing process is to prepare a test plan that will test all
aspects of the system. A workable test plan was prepared in accordance with the design
specification. It includes output expected from the system criteria for evaluating outputs;
volumes of test data produce procedure for using test data.

The Test data should be such that they
Guarantee that all independent paths within a module have been exercised.
Exercise all logical decisions on their true or false sides.
Execute all Loops at their boundaries and with their operational boundary.
Exercise internal data structures to assure their validation.

8.3 UNIT TESTING
Testing of individual software components or modules. Typically done by the
programmer and not by testers, as it requires detailed knowledge of the internal program
design and code. May require developing test drive modules or test harnesses. Functional
and reliability testing in an Engineering environment. Producing tests for the behavior of
components of a product to ensure their correct behavior prior to system integration.

32

8.4 INTEGRATION TESTING
Testing in which modules are combined and tested as a group. Modules are
typically code modules, individual applications, client and server applications on a
network, etc. Integration Testing follows unit testing and precedes system testing. Testing
of integrated modules to verify combined functionality after integration. Modules are
typically code modules, individual applications, client and server applications on a
network, etc. This type of testing is especially relevant to client/server and distributed
systems. All the bottom or low-level modules, procedures or functions are integrated and
then tested. After the integration testing of lower level integrated modules, the next level of
modules will be formed and can be used for integration testing. This approach is helpful
only when all or most of the modules of the same development level are ready. This
method also helps to determine the levels of software developed and makes it easier to
report testing progress in the form of a percentage.

8.5 VALIDATION TESTING
Validation testing answers the question, "Are you building the right software
system". Another question, which the entire process of validation testing in software
engineering answers is, "Is the deliverable fit for purpose". Therefore, often the testing
activities are introduced early in the software development life cycle. The two major
areas, when validation testing should take place are in the early stages of software
development and towards the end, when the product is ready for release. In other words,
it is acceptance testing which is a part of validation testing.

Verification is intended to check that a product, service, or system (or portion
thereof, or set thereof) meets a set of initial design requirements, specifications, and
regulations. In the development phase, verification procedures involve performing special
tests to model or simulate a portion, or the entirety, of a product, service or system, then
performing a review or analysis of the modeling results. In the post-development phase,
verification procedures involve regularly repeating tests devised specifically to ensure
that the product, service, or system continues to meet the initial design requirements,
33

specifications, and regulations as time progresses. . Verification can be in development,
scale-up, or production. This is often an internal process.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
















34

CHAPTER 9
CONCLUSION
Android is a great platform for writing secure applications. It provides a type-safe
language (Java), an advanced security model, a proven class library, and a powerful set of
appropriate and securable abstractions for development on mobile devices. Androids
framework typically defaults to safe behavior unless the developer explicitly decides to
share data between applications, and then it focuses the security model around the user.
Androids open design means that finding and fixing transfer the data in one to another
devices that holes is done by the widest possible group of people.




















35

CHAPTER 10
FUTURE ENHANCEMENT
Future enhancements are one of the inevitable for any kind of software
project. The important thing is that the system should be flexible enough, for further
modifications. Considering this factor, the system is designed in such a way that the
provision is given for further enhancement, without affecting the system presently
developed. Some of the enhancement features that can be applicable for our project in
future are listed as follows.

To reduce the time efficiency.
To implement all the mobile with different platform.
To improve the security.












36

BIBLIOGRAPHY

BOOKS
[1] Andreas Stolcke, , Barry Chen, Horacio Franco,Venkata Ramana Rao
Gadde, Martin Graciarena, , Mei-Yuh Hwang, Katrin Kirchhoff, , Arindam
Mandal, Nelson Morgan, , Xin Lei, Tim Ng, Mari Ostendorf, Kemal Snmez,
Anand Venkataraman, Dimitra Vergyri, and Qifeng Zhu, Recent Innovations in
Speech-to-Text Transcription at Sri- icsi-uw IEEE Transactions On Audio,
Speech, And Language Processing,vol.14,no. 5, septembe 2006,pp 1729-1744

[2] Brandon Ballinger, Cyril Allauzen, Alexander Gruenstein, Johan
Schalkwyk, On-Demand Language Model Interpolation for Mobile Speech
Input, INTERSPEECH 2010, 26-30 September
2010, Makuhari, Chiba, Japan, pp 1812-1815

[3] Ryuichi Nisimura, Jumpei Miyake, Hideki Kawahara and Toshio Irino,
Speech-To-Text Input Method For Web System Using Javascript, IEEE SLT
2008 pp 209-212

[4] M. Tomalin, F. Diehl, M.J.F. Gales, J. Park & P.C. Woodland , Recent
Improvements To The Cambridge Arabic Speech-To-Text Systems, ICASSP
2010 pp 4382-4385

[5] Janet See, Umi Kalsom Yusof, Amin Kianpisheh,User Acceptance
towards a Personalised Handsfree Messaging Application (iSay-SMS),
CSSR 2010 Initial Submission December 5-7,2010 pp 1165-
1170

WEBSITES
http://developer.android.com
http://developer.android.com/reference/android/bluetooth/package summary.html
http://developer.android.com/sdk/index.html
http://developer.android.com/sdk/installing/bundle.html
http://en.wikipedia.org/wiki/Eclipse_(software)

37

APPENDIX A
SCREEN SHOTS

A[1] : SMS Application Installed in Android Mobile





38





A[2] : SMS Application Inbox View





39




A[3] : SMS Application Input Type Selection







40




A[4] : SMS Application Keypad Type






41





A[5] : SMS Application Voice Recognition Type







42






A[6] : SMS Application Contact List






43





A[7] : SMS Application Sample Keypad Message





44





A[8] : SMS Application Message View Status





45





A[9] : SMS Application Message Opened Status






46

APPENDIX B
CODING
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />

</RelativeLayout>















47

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<TextView
android:id="@+id/textViewSMSSender"
android:paddingLeft="2dp"
android:textSize="20dp"
android:textStyle="bold"
android:textColor="#0000FF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />

<TextView
android:id="@+id/textViewMessageBody"
android:paddingLeft="5dp"
android:textColor="#ffffff"
android:textSize="17dp"
android:maxLines="1"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />

</LinearLayout>














48


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="right"
android:orientation="vertical"
>

<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="350dp" >

</ListView>

<FrameLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@android:color/background_light" >

<ImageButton
android:id="@+id/imageButton1"
android:layout_width="60dp"
android:layout_height="65dp"
android:src="@drawable/msg" />

<TextView
android:id="@+id/textView1"
android:layout_width="254dp"
android:layout_height="wrap_content"
android:layout_gravity="center|center_horizontal|right"
android:text="Compose Message"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#000000" />

</FrameLayout>

</LinearLayout>






49


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="@android:color/darker_gray" >

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Select Input Type"
android:textAppearance="?android:attr/textAppearanceLarge" />
</FrameLayout>

<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/frameLayout1"
android:layout_centerHorizontal="true"
android:layout_marginTop="48dp"
android:src="@drawable/mic" />

<ImageButton
android:id="@+id/imageButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="24dp"
android:src="@drawable/key" />

</RelativeLayout>






50

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="500dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:background="@android:color/background_light" >

<Button
android:id="@+id/buttonno"
android:layout_width="40dp"
android:layout_height="45dp"
android:layout_gravity="right"
android:background="@drawable/mic"
android:minWidth="46dip"
android:text="..." />

<EditText
android:id="@+id/editTextFileName"
android:layout_width="281dp"
android:layout_height="wrap_content"
android:layout_alignTop="@id/buttonno"
android:layout_toLeftOf="@id/buttonno"
android:ems="10"
android:hint="Receiver Number"
android:inputType="textUri" />
</FrameLayout>

<FrameLayout
android:layout_width="500dp"
android:layout_height="405dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/frameLayout1"
android:layout_marginTop="14dp"
android:background="@android:color/background_light" >

<EditText
android:id="@+id/editText1"
android:layout_width="fill_parent"
android:layout_height="210dp"
android:ems="10"
51

android:gravity="top"
android:hint="Message" >

<requestFocus />
</EditText>

<Button
android:id="@+id/buttonmsg"
android:layout_width="40dp"
android:layout_height="45dp"
android:layout_gravity="center|center_horizontal|left"
android:background="@drawable/mic"
android:minWidth="46dip"
android:text="..." />

<Button
android:id="@+id/button1"
android:layout_width="78dp"
android:layout_height="wrap_content"
android:layout_gravity="center|right"
android:text="Send" />

</FrameLayout>

</RelativeLayout>
























52

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom" >

<FrameLayout
android:id="@+id/frameLayout1"
android:layout_width="500dp"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:background="@android:color/background_light" >

<Button
android:id="@+id/buttonFileSelect"
android:layout_width="40dp"
android:layout_height="45dp"
android:layout_gravity="right"
android:background="@drawable/landline"
android:minWidth="46dip"
android:text="..." />

<EditText
android:id="@+id/editTextFileName"
android:layout_width="281dp"
android:layout_height="wrap_content"
android:layout_alignTop="@id/buttonFileSelect"
android:layout_toLeftOf="@id/buttonFileSelect"
android:ems="10"
android:hint="Receiver Number"
android:inputType="textUri" />
</FrameLayout>

<FrameLayout
android:layout_width="500dp"
android:layout_height="405dp"
android:layout_alignParentLeft="true"
android:layout_below="@+id/frameLayout1"
android:layout_marginTop="14dp"
android:background="@android:color/background_light" >

<EditText
android:id="@+id/editText1"
android:layout_width="fill_parent"
53

android:layout_height="210dp"
android:ems="10"
android:gravity="top"

android:hint="Message" >

<requestFocus />
</EditText>

<Button
android:id="@+id/button1"
android:layout_width="73dp"
android:layout_height="wrap_content"
android:layout_gravity="center|right"
android:text="Send" />

</FrameLayout>

</RelativeLayout>





























54



package net.learn2develop.SMS;

import android.R.integer;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ContentValues;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;

import android.net.Uri;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.util.SparseBooleanArray;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnKeyListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;
import android.widget.Toast;

public class MainActivity extends Activity {

ImageButton btnSendSMS;
IntentFilter intentFilter;
EditText msg,no;
String phoneNo,sms,item;

private BroadcastReceiver intentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
//---display the SMS received in the TextView---
55

//TextView SMSes = (TextView) findViewById(R.id.textView1);
// SMSes.setText(intent.getExtras().getString("sms"));
}
};

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

btnSendSMS=(ImageButton)findViewById(R.id.imageButton1);
btnSendSMS.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent1 = new Intent(MainActivity.this,second.class);
startActivity(intent1);
//finish();
}
});

//---intent to filter for SMS messages received---
intentFilter = new IntentFilter();
intentFilter.addAction("SMS_RECEIVED_ACTION");

//---register the receiver---
registerReceiver(intentReceiver, intentFilter);




/* if (phoneNo.length()>0 && sms.length()>0)
{
btnSendSMS.setVisibility(View.VISIBLE);

}*/



final ListView lViewSMS = (ListView) findViewById(R.id.listView1);

int[] arrayViewIDs = new
int[]{R.id.textViewSMSSender,R.id.textViewMessageBody};
56

String[] arrayColumns = new String[]{"address","body"};

Cursor cursor;
cursor = getContentResolver().query(Uri.parse("content://sms/inbox"), null, "read =
0", null, null);
// cursor = getContentResolver().query(Uri.parse("content://sms/inbox"), null, null,
null, "date desc limit 1");
/* getContentResolver().query(SMS_INBOX, new String[] {body, address},
null, null, "date desc limit 3");*/
// create an Adapter with arguments layoutID, Cursor, Array Of Columns, and Array of
ViewIds which is to be Populated

SimpleCursorAdapter adapter = new SimpleCursorAdapter(MainActivity.this,
R.layout.list, cursor, arrayColumns, arrayViewIDs);
lViewSMS.setAdapter(adapter);

lViewSMS.setOnItemClickListener(new OnItemClickListener() {

@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
/*if(arg0.getItemAtPosition(arg2).toString() != null)
{*/

// ContentValues values = new ContentValues();
//values.put("status", SmsManager.STATUS_ON_ICC_READ);
final TextView
textViewSMSSender=(TextView)findViewById(R.id.textViewSMSSender);
TextView
textViewSMSBody=(TextView)findViewById(R.id.textViewMessageBody);
String smsBody;
smsBody=textViewSMSBody.getText().toString();
int s1;
s1=smsBody.length();

String smsSender=textViewSMSSender.getText().toString();



String ss=smsBody.substring(0, 7);
SmsManager manager = SmsManager.getDefault();
manager.sendTextMessage(smsSender, null, ss+",This Message Is Viewed By
the User!", null, null);

57



if(s1<=2)
{
/* String ss=smsBody.substring(0, 1);
Toast.makeText(MainActivity.this, ss, 10).show();
SmsManager manager = SmsManager.getDefault();
manager.sendTextMessage(smsSender, null, ss+",This Message Is Viewed By
the User!", null, null);*/
}

if(s1>=20)
{

/* String ss=smsBody.substring(0, 20);
Toast.makeText(MainActivity.this, ss, 10).show();
SmsManager manager = SmsManager.getDefault();
manager.sendTextMessage(smsSender, null, ss+",This Message Is Viewed By
the User!", null, null);*/

}
/*if(s1<=s2)
{

SmsManager manager = SmsManager.getDefault();
manager.sendTextMessage(smsSender, null, ss+",This Message Is Viewed By
the User!", null, null);
}
else
{
String s=smsBody.substring(0, 20);
SmsManager manager = SmsManager.getDefault();
manager.sendTextMessage(smsSender, null, s+",This Message Is Viewed By
the User!", null, null);
}
*/
// Toast.makeText(MainActivity.this, smsSender, 10).show();
// int ss= lViewSMS.getSelectedItemPosition();


/* String ss= (String) lViewSMS.getItemAtPosition(arg2);
Toast.makeText(MainActivity.this, ss, 10).show();
lViewSMS.get;*/


58

/* Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.putExtra("address", smsSender);
i.putExtra("sms_body", "Your Message Has Viewed!");
i.setType("vnd.android-dir/mms-sms");
startActivity(i);*/

String smsBodyy=textViewSMSBody.getText().toString();
AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).create();
dialog.setTitle("SMS From : "+smsSender);
dialog.setIcon(android.R.drawable.ic_dialog_info);
dialog.setMessage(smsBodyy);
dialog.setButton(DialogInterface.BUTTON_POSITIVE, "OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{

dialog.dismiss();
return;
}
});
dialog.show();
}
/*}*/


});
/* final ArrayList<String> sms = new ArrayList<String>();


ContentResolver cr = getContentResolver();
final Cursor cursor = cr.query(Uri.parse("content://sms/inbox"), new String []
{"person","address","body","date","_id","read", "status", "type", "reply_path_present",
"subject","thread_id"} , null, null,"date DESC");
final int indexBody = cursor.getColumnIndex("body");
final int indexAddr = cursor.getColumnIndex("address");
if (indexBody < 0 || !cursor.moveToFirst())
return ;


sms.clear();

do {
String str = "Sender : " + cursor.getString(1) + "\n"
+ cursor.getString(indexBody);
sms.add(str);
59

// ADDRESS[total] = cursor.getString(indexAddr);
// total++;
} while (cursor.moveToNext());
final ListView lViewSMS = (ListView) findViewById(R.id.listView1);
lViewSMS.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, sms));

lViewSMS.setOnItemClickListener(new OnItemClickListener() {

@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int
arg2,
long arg3) {
// TODO Auto-generated method stub
String s=arg0.getItemAtPosition(arg2).toString();

if(arg0.getItemAtPosition(arg2).toString() != null)
{
Toast.makeText(MainActivity.this,s , 10).show();
}


//Toast.makeText(MainActivity.this,indexAddr ,
10).show();
}
});*/
}


@Override
protected void onResume() {
//---register the receiver---
//registerReceiver(intentReceiver, intentFilter);
super.onResume();
}

@Override
protected void onPause() {
//---unregister the receiver---
//unregisterReceiver(intentReceiver);
super.onPause();
}

@Override
protected void onDestroy() {
60

//---unregister the receiver---
unregisterReceiver(intentReceiver);
super.onPause();
}





/*
//---sends an SMS message to another device---
private void sendSMS(String phoneNumber, String message)
{
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, null, null);
}
*/

//---sends an SMS message to another device---


}
















61

package net.learn2develop.SMS;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class second extends Activity{
ImageButton imageButton1,imageButton2;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.second);
imageButton1=(ImageButton)findViewById(R.id.imageButton1);
imageButton1.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent1 = new
Intent(second.this,speak.class);
startActivity(intent1);
}
});
imageButton2=(ImageButton)findViewById(R.id.imageButton2);
imageButton2.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent1 = new Intent(second.this,test.class);
startActivity(intent1);
}
});
}
}





62

package net.learn2develop.SMS;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.widget.Toast;

public class SMSReceiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
//---get the SMS message passed in---
Bundle bundle = intent.getExtras();
SmsMessage[] msgs = null;
String str = "";
if (bundle != null)
{
//---retrieve the SMS message received---
Object[] pdus = (Object[]) bundle.get("pdus");
msgs = new SmsMessage[pdus.length];
for (int i=0; i<msgs.length; i++){
msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);
str += "SMS from " + msgs[i].getOriginatingAddress();
str += " :";
str += msgs[i].getMessageBody().toString();
str += "\n";
}
//---display the new SMS message---
Toast.makeText(context, str, Toast.LENGTH_SHORT).show();

//---launch the MainActivity---
Intent mainActivityIntent = new Intent(context, MainActivity.class);
mainActivityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(mainActivityIntent);
//---send a broadcast to update the SMS received in the activity---
Intent broadcastIntent = new Intent();
broadcastIntent.setAction("SMS_RECEIVED_ACTION");
broadcastIntent.putExtra("sms", str);
context.sendBroadcast(broadcastIntent);
}
}
}
63


package net.learn2develop.SMS;

import java.util.ArrayList;

import android.app.Activity;
import android.app.PendingIntent;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.speech.RecognizerIntent;
import android.telephony.SmsManager;
import android.text.InputFilter;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class speak extends Activity {
protected static final int RESULT_SPEECH = 1,RESULT_SPEECH1=0;
public Button b,b1,buttonmsg;
EditText msg;
String phoneNo,sms;
public EditText editTextFileName,editText1;

private BroadcastReceiver intentReceiver = new BroadcastReceiver(){

@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub

}

};
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.speak);

b1=(Button)findViewById(R.id.button1);
buttonmsg =(Button)findViewById(R.id.buttonmsg);
buttonmsg.setVisibility(View.VISIBLE);
editText1=(EditText)findViewById(R.id.editText1);
editTextFileName=(EditText)findViewById(R.id.editTextFileName) ;
msg = (EditText) findViewById(R.id.editText1);
/* int m=160;
msg.setFilters(new InputFilter[] {new InputFilter.LengthFilter(m)});
64

int maxLength = 10;
editTextFileName.setFilters(new InputFilter[] {new
InputFilter.LengthFilter(maxLength)});
*/
buttonmsg.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
buttonmsg.setVisibility(View.GONE);

Intent intent = new Intent(

RecognizerIntent.ACTION_RECOGNIZE_SPEECH);


intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en-US");

try {
startActivityForResult(intent,
RESULT_SPEECH1);
editText1.setText("");
} catch (ActivityNotFoundException a) {
Toast t =
Toast.makeText(getApplicationContext(),
"Ops! Your device doesn't
support Speech to Text",
Toast.LENGTH_SHORT);
t.show();
}
}
});



b=(Button)findViewById(R.id.buttonno);
b.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {

Intent intent = new Intent(

RecognizerIntent.ACTION_RECOGNIZE_SPEECH);


intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en-US");

try {
startActivityForResult(intent,
RESULT_SPEECH);
editTextFileName.setText("");
} catch (ActivityNotFoundException a) {
Toast t =
Toast.makeText(getApplicationContext(),
65

"Ops! Your device doesn't
support Speech to Text",
Toast.LENGTH_SHORT);
t.show();
}
}
});
b1.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {

// TODO Auto-generated method stub
phoneNo = editTextFileName.getText().toString();
sms = msg.getText().toString();
if(phoneNo.equals(""))
{
Toast.makeText(getBaseContext(),
"Please enter phone number.",
Toast.LENGTH_SHORT).show();
}

else
{
//Toast.makeText(getApplicationContext(), phoneNo, 10).show();
sendSMS(phoneNo, sms);
msg.setText("");
editTextFileName.setText("");
buttonmsg.setVisibility(View.VISIBLE);

}

}

private void sendSMS(String phoneNumber, String message)
{
// TODO Auto-generated method stub
String SENT = "SMS_SENT";
String DELIVERED = "SMS Received";
PendingIntent sentPI = PendingIntent.getBroadcast(speak.this, 0,
new Intent(SENT),0 );
// PendingIntent sentPI = PendingIntent.getBroadcast(this, 0,
// new Intent(SENT), 0);

PendingIntent deliveredPI =
PendingIntent.getBroadcast(speak.this, 0,
new Intent(DELIVERED), 0);

//---when the SMS has been sent---
registerReceiver(new BroadcastReceiver(){
@Override
public void onReceive(Context arg0, Intent arg1) {
switch (getResultCode())
{
case Activity.RESULT_OK:
66

Toast.makeText(getBaseContext(), "SMS sent",
Toast.LENGTH_SHORT).show();
break;
case
SmsManager.RESULT_ERROR_GENERIC_FAILURE:
Toast.makeText(getBaseContext(), "Generic failure",
Toast.LENGTH_SHORT).show();
break;
case SmsManager.RESULT_ERROR_NO_SERVICE:
Toast.makeText(getBaseContext(), "No service",
Toast.LENGTH_SHORT).show();
break;
case SmsManager.RESULT_ERROR_NULL_PDU:
Toast.makeText(getBaseContext(), "Null PDU",
Toast.LENGTH_SHORT).show();
break;
case SmsManager.RESULT_ERROR_RADIO_OFF:
Toast.makeText(getBaseContext(), "Radio off",
Toast.LENGTH_SHORT).show();
break;
}
}
}, new IntentFilter(SENT));

//---when the SMS has been delivered---
registerReceiver(new BroadcastReceiver(){
@Override
public void onReceive(Context arg0, Intent arg1) {
switch (getResultCode())
{
case Activity.RESULT_OK:
Toast.makeText(getBaseContext(), "SMS Received By
"+phoneNo,
Toast.LENGTH_SHORT).show();
break;
case Activity.RESULT_CANCELED:
Toast.makeText(getBaseContext(), "SMS not delivered",
Toast.LENGTH_SHORT).show();
break;
case Activity.RESULT_FIRST_USER:
Toast.makeText(getBaseContext(), "Ur SMS is
Viewed ",
Toast.LENGTH_SHORT).show();
}
}
}, new IntentFilter(DELIVERED));

SmsManager sms1 = SmsManager.getDefault();
sms1.sendTextMessage(phoneNumber, null, message, sentPI,
deliveredPI);
// Toast.makeText(getApplicationContext(), phoneNumber,
10).show();
// sms1.sendTextMessage("5556", null, message, sentPI,
deliveredPI);
}
67


});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);

switch (requestCode) {
case RESULT_SPEECH1: {
if (resultCode == RESULT_OK && null != data) {

ArrayList<String> text = data

.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);

editText1.setText(text.get(0));
}
break;
}
case RESULT_SPEECH: {
if (resultCode == RESULT_OK && null != data) {

ArrayList<String> text = data

.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);

editTextFileName.setText(text.get(0));
}
break;
}

}
}
}










68

package net.learn2develop.SMS;

import android.app.Activity;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Contacts.People;
import android.provider.ContactsContract;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Contacts;
import android.telephony.SmsManager;
import android.text.InputFilter;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class test extends Activity {
public Button b,b1;
EditText msg;
String phoneNo,sms;
public EditText editTextFileName;
private BroadcastReceiver intentReceiver = new BroadcastReceiver(){

@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub

}

};
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ss);

b1=(Button)findViewById(R.id.button1);


69

editTextFileName=(EditText)findViewById(R.id.editTextFileName) ;
msg = (EditText) findViewById(R.id.editText1);
int m=160;
msg.setFilters(new InputFilter[] {new InputFilter.LengthFilter(m)});
int maxLength = 10;
editTextFileName.setFilters(new InputFilter[] {new
InputFilter.LengthFilter(maxLength)});
b=(Button)findViewById(R.id.buttonFileSelect);
b.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
int maxLength = 14;
editTextFileName.setFilters(new InputFilter[] {new
InputFilter.LengthFilter(maxLength)});
if(v==b){
Intent intent = new
Intent(Intent.ACTION_GET_CONTENT);

intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_T
YPE);
startActivityForResult(intent, 1);
/*Intent i =new
Intent(Intent.ACTION_PICK,Contacts.CONTENT_URI);
startActivityForResult(i, 1);*/
}
}
});

b1.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {

// TODO Auto-generated method stub
phoneNo = editTextFileName.getText().toString();
sms = msg.getText().toString();
if(phoneNo.equals(""))
{
Toast.makeText(getBaseContext(),
"Please enter phone number.",
Toast.LENGTH_SHORT).show();
}

70

else
{
//Toast.makeText(getApplicationContext(), phoneNo,
10).show();
sendSMS(phoneNo, sms);
msg.setText("");
editTextFileName.setText("");

}

}

private void sendSMS(String phoneNumber, String
message) {
// TODO Auto-generated method stub
String SENT = "SMS_SENT";
String DELIVERED = "SMS Received";
PendingIntent sentPI = PendingIntent.getBroadcast(test.this,
0, new Intent(SENT),0 );
// PendingIntent sentPI = PendingIntent.getBroadcast(this, 0,
// new Intent(SENT), 0);

PendingIntent deliveredPI =
PendingIntent.getBroadcast(test.this, 0,
new Intent(DELIVERED), 0);

//---when the SMS has been sent---
registerReceiver(new BroadcastReceiver(){
@Override
public void onReceive(Context arg0, Intent arg1) {
switch (getResultCode())
{
case Activity.RESULT_OK:
Toast.makeText(getBaseContext(), "SMS sent",
Toast.LENGTH_SHORT).show();
break;
case
SmsManager.RESULT_ERROR_GENERIC_FAILURE:
Toast.makeText(getBaseContext(), "Generic
failure",
Toast.LENGTH_SHORT).show();
break;
case SmsManager.RESULT_ERROR_NO_SERVICE:
Toast.makeText(getBaseContext(), "No service",
Toast.LENGTH_SHORT).show();
71

break;
case SmsManager.RESULT_ERROR_NULL_PDU:
Toast.makeText(getBaseContext(), "Null PDU",
Toast.LENGTH_SHORT).show();
break;
case SmsManager.RESULT_ERROR_RADIO_OFF:
Toast.makeText(getBaseContext(), "Radio off",
Toast.LENGTH_SHORT).show();
break;
}
}
}, new IntentFilter(SENT));

//---when the SMS has been delivered---
registerReceiver(new BroadcastReceiver(){
@Override
public void onReceive(Context arg0, Intent arg1) {
switch (getResultCode())
{
case Activity.RESULT_OK:
Toast.makeText(getBaseContext(), "SMS Received
By "+phoneNo,
Toast.LENGTH_SHORT).show();
break;
case Activity.RESULT_CANCELED:
Toast.makeText(getBaseContext(), "SMS not
delivered",
Toast.LENGTH_SHORT).show();
break;
case Activity.RESULT_FIRST_USER:
Toast.makeText(getBaseContext(), "Ur SMS is
Viewed ",
Toast.LENGTH_SHORT).show();
}
}
}, new IntentFilter(DELIVERED));

SmsManager sms1 = SmsManager.getDefault();
sms1.sendTextMessage(phoneNumber, null, message, sentPI,
deliveredPI);
// Toast.makeText(getApplicationContext(), phoneNumber,
10).show();
// sms1.sendTextMessage("5556", null, message, sentPI,
deliveredPI);
}
72


});
}


@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);

if(requestCode == 1){

Uri contactData = data.getData();
Cursor cursor = managedQuery(contactData, null, null, null, null);
cursor.moveToFirst();
// String name =
cursor.getString(cursor.getColumnIndexOrThrow(Contacts.DISPLAY_NAME));
String number =
cursor.getString(cursor.getColumnIndex(Phone.NUMBER));
//String email =
cursor.getString(cursor.getColumnIndexOrThrow(People.PRIMARY_EMAIL_ID));
// contactName.setText(name);
// contactNumber.setText(number);
// contactEmail.setText(email);
editTextFileName.setText(number);

}
}
}










73

APPENDIX C
TECHNOLOGY/SOFTWARE
Android Development Kit
Android software development is the process by which new applications are
created for the Android operating system. Applications are usually developed in the Java
programming language using the Android Software Development Kit, but other
development tools are available. As of October 2012, more than 700,000 applications
have been developed for Android, with over 25 billion downloads.
[
A June 2011 research
indicated that over 67% of mobile developers used the platform, at the time of
publication. In Q2 2012; around 105 million units of Android smartphones were shipped
which acquires a total share of 68% in overall smartphones sale till Q2 2012.
Android SDK
The Android software development kit (SDK) includes a comprehensive set of
development tools.These include adebugger, libraries, a handset emulator based
on QEMU, documentation, sample code, and tutorials. Currently supported development
platforms include computers running Linux(any modern desktop Linux distribution), Mac
OS X 10.5.8 or later,Windows XPor later. The officially supported integrated
development environment (IDE) is Eclipse using the Android Development Tools (ADT)
Plugin, though IntelliJ IDEA IDE (all editions) fully supports Android development out
of the box, and NetBeans IDE also supports Android development via a
plugin. Additionally, 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).
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
74

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 only to the root user for security reasons). APK
package contains .dex files (compiled byte code files called Dalvik executables), resource
files, etc.
Android Debug Bridge
The Android Debug Bridge (ADB) is a toolkit included in the Android SDK
package. It consists of both client and server-side programs that communicate with one
another. The ADB is typically accessed through the command-line interface.
The format for issuing commands through the ADB is typically:
adb [-d|-e|-s <serialNumber>] <command>
In a security issue reported in March 2011, ADB was targeted as a vector to attempt to
install a rootkit on connected phones using a "resource exhaustion attack".













75


APPENDIX D
LIST OF FIGURES

S.No
FIGURE NO NAME PAGE NO
1 4.1 Overall Usecase diagram 16
2 4.2 Usecase diagram for internal metric module 17
3 4.3 Usecase diagram for external metric module 18
4 4.4 Usecase diagram for system metric module 19
5 4.5 Usecase diagram for derived metric module 20
6 4.6 Overall Sequence diagram of the system 21
7 4.7 Overall Activity diagram of the system 22
8 5.1 Architectural diagram 24
9 5.1.1 Thefind-bind execute paradigm 25
10 5.1.2 The quality attribute metric paradigm 26
11 5.2 Data Design diagram 27
12 5.3 User interface diagram 36
13 6.1 Service Component Diagram 39









76


APPENDIX E
DEFINITION AND ABBREVIATIONS
S.No TERMS Definition/Abbreviations
1. ADK Android Development kit
2. IDE
Integrated development environment
3. SDLC Software Development Life Cycle
4. UML Unified Modeling Language
5. ER Entity Relationship diagram
6. SDK Software Development Kit

Вам также может понравиться