Documentation
Documentation
ABSTRACT
1
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
ABSTRACT
Android based remote desktop client is a remote control system which allows you to view and
interact with one computer (known as “server”) to cellular phones (Android OS) anywhere on the
intranet. A viewer is provided on the cellular phone that enables the user to see and manipulate the
desktop of remote systems such as MS Windows. The system to be accessed must be running a
server and it must be attached to a network. A prototype of the proposed system been implemented
using Android and will be tested on a Android Virtual Device emulator. To reduce user effort and
solve problems inherent to the cellular phones small screen, several functions are provided on the
cellular viewer.
2
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Chapter 1:
1 INTRODUCTION TO PROJECT
The project scope for remote controlled desktop using android is by using the android mobile to
make the actions done without using keyboard and mouse. Android based remote desktop client is a
remote control system which allows us to view and interact with one computer to cellular phones
anywhere on the intranet. By this application our mobile phone or tablet will turn into a wireless
user-friendly remote control for our computer.
The main purpose of Remote Controlled Desktop Using Android is how to handle the
desktop with android phone without using key board or a mouse.
Project scope for remote controlled desktop using android is by using the android mobile to
make the actions done without using keyboard and mouse. Android based remote desktop client is a
remote control system which allows us to view and interact with one computer to cellular phones
anywhere on the intranet.
This remote desktop client is a remote control system which allows you to view and interact
with one computer (known as “server”) to cellular phones (Android OS) anywhere on the intranet.
This app turns your mobile phone or tablet into a wireless user-friendly remote control for your
3
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
computer. It’ll surprise you with fully simulated touchpad, keyboard and featured remote panels
which make your remote experience simple and efficient.
To reduce user effort and solve problems inherent to the cellular phones small screen,
several functions are provided on the cellular viewer.
Supports multiple connections at the same time.
Different work modes: "view only" and "full control".
Different display modes: "windowed", "full screen", and "scaled".
File transfer between local and remote computers
Remote power management (remote shutdown, reboot, logoff, etc.)
Strong connection security.
Runs as a service on the NT systems.
Works through the firewalls and supports DHCP.
Supports high screen resolutions and color depths.
Uses a log file to log the events and solve connection problems.
4
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Chapter 2:
In existing system we have pc operate with mouse and keyboard. User can perform the
cursor events using mouse and also click operations (left and right). User can type the text using
keyboard.
We are proposed to develop an application for keyboard and mouse operations with in
mobile android application. In this app we have one server (windows) and client (Android).So
client user connect with desktop using IP address and works under the wifi
2.2.1 ADVANTAGES
1) Through this web application we can save the time, we can efficiently get succeed in
implementing all the requests within short span of time.
2.3.1.1 Remote Connect: - By entering the computer ip address in the mobile and entering the
mobile ip address in the pc we are going to connect the android mobile with desktop and by this we
can use this as a remote.
5
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
2.3.1.2Fully Stimulated Mouse : - User can perform the cursor events using mouse and also
click operations (left and right).
2.3.1.3 Touch Opera: - The operations that we do on the keyboard the same way we can do in our
android mobile.
2.3.1.4 Keyboard: - The keyboard works same way with all the keys by using the android mobile.
2.3.1.5 Socket operations: - The operations performed in this application are user friendly.
The next step in analysis is to verify the feasibility of the proposed system. “All projects are
feasible given unlimited resources and infinite time“. But in reality both resources and time are
scarce. Project should confirm to time bounce and should be optimal in their consumption of
resources. This place a constant is approval of any project.
Technical feasibility
Operational feasibility
Economical feasibility
6
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
To determine whether the proposed system is technically feasible, we should take into
consideration the technical issues involved behind the system.
This Application uses the web technologies, which is rampantly employed these days
worldwide. The world without the web is incomprehensible today. That goes to proposed system is
technically feasible.
To determine the operational feasibility of the system we should take into consideration the
awareness level of the users. This system is operational feasible since the users are familiar with the
technologies and hence there is no need to gear up the personnel to use system. Also the system is
very friendly and to use.
To decide whether a project is economically feasible, we have to consider various factors as:
This document play a vital role in the development of life cycle (SDLC) as it describes the
complete requirement of the system. It means for use by developers and will be the basic
during testing phase. Any changes made to the requirements in the future will have to go
through formal change approval process.
7
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
2.5.2 SPIRAL MODEL was defined by Barry Boehm in his 1988 article, “A spiral Model
of Software Development and Enhancement. This model was not the first model to discuss
iterative development. The spiral model is similar to the incremental model, with more emphasis
placed on risk analysis. The spiral model has four phases: Planning, Risk Analysis, Engineering
and Evaluation. A software project repeatedly passes through these phases in iterations (called
Spirals in this model). The baseline spirals, starting in the planning phase, requirements are
gathered and risk is assessed. Each subsequent spiral builds on the baseline spiral.
As originally envisioned, the iterations were typically 6 months to 2 years long. Each phase
starts with a design goal and ends with a client reviewing the progress thus far. Analysis and
engineering efforts are applied at each phase of the project, with an eye toward the end goal of
the project.
The new system requirements are defined in as much details as possible. This usually
involves interviewing a number of users representing all the external or internal users
and other aspects of the existing system.
A first prototype of the new system is constructed from the preliminary design. This is
usually a scaled-down system, and represents an approximation of the characteristics of
the final product.
1. Evaluating the first prototype in terms of its strengths, weakness, and risks.
At the customer option, the entire project can be aborted if the risk is deemed too great.
Risk factors might involved development cost overruns, operating-cost miscalculation,
8
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
or any other factor that could, in the customer’s judgment, result in a less-than-
satisfactory final product.
The existing prototype is evaluated in the same manner as was the previous prototype,
and if necessary, another prototype is developed from it according to the fourfold
procedure outlined above.
The preceding steps are iterated until the customer is satisfied that the refined prototype
represents the final product desired.
The final system is thoroughly evaluated and tested. Routine maintenance is carried on
a continuing basis to prevent large scale failures and to minimize down time.
9
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Planning Phase: Requirements are gathered during the planning phase. Requirements like
‘BRS’ that is ‘Business Requirement Specifications’ and ‘SRS’ that is ‘System Requirement
specifications’.
Risk Analysis: In the risk analysis phase, a process is undertaken to identify risk and
alternate solutions. A prototype is produced at the end of the risk analysis phase. If any risk
is found during the risk analysis then alternate solutions are suggested and implemented.
Engineering Phase: In this phase software is developed, along with testing at the end of the
phase. Hence in this phase the development and testing is done.
10
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Evaluation phase: This phase allows the customer to evaluate the output of the project
to date before the project continues to the next spiral.
Chapter 3:
3 SYSTEM DESIGN
System design is transition from a user oriented document to programmers or data base
personnel. The design is a solution, how to approach to the creation of a new system. This is
composed of several steps. It provides the understanding and procedural details necessary for
implementing the system recommended in the feasibility study. Designing goes through logical and
11
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
physical stages of development, logical design reviews the present physical system, prepare input
and output specification, details of implementation plan and prepare a logical design walkthrough.
The database tables are designed by analyzing functions involved in the system and
format of the fields is also designed. The fields in the database tables should define their role in the
system. The unnecessary fields should be avoided because it affects the storage areas of the system.
Then in the input and output screen design, the design should be made user friendly. The menu
should be precise and compact.
. Modularity and partitioning: software is designed such that, each system should
consists of hierarchy of modules and serve to partition into separate function.
Coupling: modules should have little dependence on other modules of a system.
Cohesion: modules should carry out in a single processing function.
Shared use: avoid duplication by allowing a single module be called by other that need
the function it provides
12
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Considering the requirements, procedures to collect the necessary input data in most efficiently
designed. The input design has been done keeping in view that, the interaction of the user with the
system being the most effective and simplified way.
13
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
All the screens of the system are designed with a view to provide the user with easy operations in
simpler and efficient way, minimum key strokes possible. Instructions and important information is
emphasized on the screen. Almost every screen is provided with no error and important messages
and option selection facilitates. Emphasis is given for speedy processing and speedy transaction
between the screens. Each screen assigned to make it as much user friendly as possible by using
interactive procedures. So to say user can operate the system without much help from the operating
manual.
Software Requirement Specification (SRS) is the starting point of the software developing
activity. As system grew more complex it became evident that the goal of the entire system cannot
be easily comprehended. Hence the need for the requirement phase arose. The software project is
initiated by the client needs. The SRS is the means of translating the ideas of the minds of clients
(the input) into a formal document (the output of the requirement phase.)
The process is order and more nebulous of the two, deals with understand the
problem, the goal and constraints.
Here, the focus is on specifying what has been found giving analysis such as
representation, specification languages and tools, and checking the specifications are
addressed during this activity.
14
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
The Requirement phase terminates with the production of the validate SRS
document. Producing the SRS document is the basic goal of this phase.
We have used Times New Roman (text size 12).Bold Font is used for Main Headings (text
size of 16). Normal font is used for sub headings (text size of 14).
This document is for better understanding for Remote desktop control. Mainly intended for
Head of the Dept., Internal guide, External guide, Staff members, Users and colleagues. This detail
given below guides every normal user to how to go through this document for better understanding.
The sequence to follow for better understanding is here Purpose, Scope , Features, Operating
requirements, Modules present in the project, Advantages, References etc.
The purpose of the Software Requirement Specification is to reduce the communication gap
between the clients and the developers. Software Requirement Specification is the medium though
which the client and user needs are accurately specified. It forms the basis of software
development. A good SRS should satisfy all the parties involved in the system.
15
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
3.5.2 SCOPE
This software is not only used for searching for required blood group, maintaining a emergency
request on homepage and maintaining details of donors and blood banks. Also provides the
awareness about blood donation to people.
The Unified Modeling Language (UML) is a standard language for writing software blue
prints. The UML is a language for
Visualizing
Specifying
Constructing
Documenting the artifacts of a software intensive system.
The UML is a language which provides vocabulary and the rules for combining words in that
vocabulary for the purpose of communication. A modeling language is a language whose
vocabulary and the rules focus on the conceptual and physical representation of a system. Modeling
yields an understanding of a system.
Things
Relationships
Diagrams
Things are the abstractions that are first-class citizens in a model; relationships tie these things
together; diagrams group interesting collections of things.
16
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Structural things
Behavioral things
Grouping things
Annotational things
Structural things are the nouns of UML models. The structural things used in the
project design are first, a class is a description of a set of objects that share the same
attributes, operations, relationships and semantics.
Window
origin
size
open()
close()
move()
display()
Fig: Classes
Second, a use case is a description of set of sequence of actions that a system performs that yields
an observable result of value to particular actor.
17
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Third, a node is a physical element that exists at runtime and represents a computational resource,
generally having at least some memory and often processing capability.
Fig: Nodes
Behavioral things are the dynamic parts of UML models. The behavioral thing used is:
Interaction:
An interaction is a behavior that comprises a set of messages exchanged among a set of objects
within a particular context to accomplish a specific purpose. An interaction involves a number of
other elements, including messages, action sequences (the behavior invoked by a message, and
links (the connection between objects).
Fig: Messages
Dependency
18
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Association
Generalization
Realization
A dependency is a semantic relationship between two things in which a change to one thing may
affect the semantics of the other thing (the dependent thing).
Fig: Dependencies
An association is a structural relationship that describes a set links, a link being a connection
among objects. Aggregation is a special kind of association, representing a structural relationship
between a whole and its parts.
Fig: Association
Fig: Generalization
19
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Fig: Realization
3.6.1.3 Sequence Diagrams:
UML sequence diagrams are used to represent the flow of messages, events and actions between the
objects or components of a system. Time is represented in the vertical direction showing the
sequence of interactions of the header elements, which are displayed horizontally at the top of the
diagram.
Sequence Diagrams are used primarily to design, document and validate the architecture, interfaces
and logic of the system by describing the sequence of actions that need to be performed to complete
a task or scenario. UML sequence diagrams are useful design tools because they provide a dynamic
view of the system behavior which can be difficult to extract from static diagrams or specifications.
Actor
Represents an external person or entity that interacts with the system
Object
Represents an object in the system or one of its components
Unit
Represents a subsystem, component, unit, or other logical entity in the system (may or may not be
implemented by objects)
20
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Separator
Represents an interface or boundary between subsystems, components or units (e.g., air interface,
Internet, network)
Group
Groups related header elements into subsystems or components
Action
Represents an action taken by an actor, object or unit
Asynchronous Message
An asynchronous message between header elements
Block
A block representing a loop or conditional for a particular header element
Call Message
A call (procedure) message between header elements
21
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Create Message
A "create" message that creates a header element (represented by lifeline going from dashed to solid
pattern)
Diagram Link
Represents a portion of a diagram being treated as a functional block. Similar to a procedure
or function call that abstracts functionality or details not shown at this level. Can optionally be
linked to another diagram for elaboration.
Message
Return Message
22
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
establish connection
pc
mobile
23
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
24
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
pc mobile
1 : establish connection()
5 : verify pc ip address()
6 : connection established()
9 : stop()
25
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
26
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
27
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
connection established
enter mobile ip
no
yes
enter pc ip
yes
verify ip address
28
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
establish connection
verify mobile ip
enter pc ip address
verify pc ip
connection established
29
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
pc mobile
enter mobile ip address
operations performed
stop
30
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
server
31
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
32
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
We use Java, JSP and Servlets as Programming language for writing the code for the
project. HTML, CSS and JavaScript for creating the web pages MYSQL server is used for creating
the local and global database (server). ECLIPSE IDE for writing the programs. Operating system
will be Windows XP.
Java
Android SDK
Eclipse Ganymede/Helios IDE
Operating System can be Windows XP.
Note: For installing this Application in to mobile device, we need android OS Mobile
phones.2.2 version android mobiles are preferable.
33
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Chapter 4:
4 IMPLEMENTATION
Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank and Mike
Sheridan at SUN Microsystems Incorporation in the year 1991.It took 18 months to develop the 1st
working version. This language was initially called “OAK”, but was renamed “JAVA” in 1995,
many more contributed to the design and evolution of the language.
Java programming language was originally developed by Sun Microsystems which was
initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java
platform (Java 1.0 [J2SE]).
As of December 2008, the latest release of the Java Standard Edition is 6 (J2SE). With the
advancement of Java and its widespread popularity, multiple configurations were built to suite
various types of platforms. Ex: J2EE for Enterprise Applications, J2ME for Mobile Applications.
Sun Microsystems has renamed the new J2 versions as Java SE, Java EE and Java ME
respectively. Java is guaranteed to be Write Once, Run Anywhere.
Java is:
Object Oriented: In Java, everything is an Object. Java can be easily extended since it is
based on the Object model.
Platform independent: Unlike many other programming languages including C and C++,
when Java is compiled, it is not compiled into platform specific machine, rather into plat-
form independent byte code. This byte code is distributed over the web and interpreted by
virtual Machine (JVM) on whichever platform it is being run.
Simple: Java is designed to be easy to learn. If you understand the basic concept of OOP
Java would be easy to master.
34
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Secure: With Java's secure feature it enables to develop virus-free, tamper-free systems.
Authentication techniques are based on public-key encryption.
Architectural-neutral: Java compiler generates an architecture-neutral object file format
which makes the compiled code to be executable on many processors, with the presence of
Java runtime system.
Portable: Being architectural-neutral and having no implementation dependent aspects of
the specification makes Java portable. Compiler in Java is written in ANSI C with a clean
portability boundary which is a POSIX subset.
Robust: Java makes an effort to eliminate error prone situations by emphasizing mainly on
compile time error checking and runtime checking.
Multithreaded: With Java's multithreaded feature it is possible to write programs that can
do many tasks simultaneously. This design feature allows developers to construct smoothly
running interactive applications.
Interpreted: Java byte code is translated on the fly to native machine instructions and is not
stored anywhere. The development process is more rapid and analytical since the linking is
an incremental and light weight process.
High Performance: With the use of Just-In-Time compilers, Java enables high perfor-
mance.
Distributed: Java is designed for the distributed environment of the internet.
Dynamic: Java is considered to be more dynamic than C or C++ since it is designed to
adapt to an evolving environment. Java programs can carry extensive amount of run-time in-
formation that can be used to verify and resolve accesses to objects on run-time.
Java is a powerful but lean object-oriented programming language. It has generated a lot of
excitement because it makes it possible to program for Internet by creating Applets. Programs that
can be embedded in web page. The context of an applet can be an animation with sound, an
interactive game or a ticker tape. With constantly updated stock prices. Applets can be just little
decorations to liven up web page, or they can be serious applications like Word processor or
Spreadsheet.
35
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
But Java is more than a programming language for writing Applets. It is being used more
and more for writing standalone applications as well. It is becoming so popular that many people
believe it will become standard language for both general purpose and Internet programming.
There are many buzzwords associated with Java, but because of its spectacular growth in
popularity, a new buzzword has appeared ubiquitous. Indeed, all indications are that it will soon be
everywhere.
Java builds on the strength of C++. It has taken the best features of C++ and discarded the
more problematic and error prone parts. To this lean core, it has added garbage collection
(automatic memory management), multithreading (the capacity for one program to do more than
one thing at a time), security capabilities. This result is that Java is simple, elegant, and powerful
and easy-to-use.
1. JAVA IS PORTABLE:
One of the biggest advantages Java offers is that it is portable. An application written in
Java will run on all the major platforms. Any computer with a Java-based browser can run the
applications or Applets written in the Java-Programming-Language. A programmer no longer has to
write one program to run on a Macintosh, another program to run on a Windows-machine still
another to run on a UNIX-machine and so on. In other words, with Java developers write their
programs only once.
The Virtual Machine is what gives Java is cross platform capabilities. Rather being
compiled into machine language, which is different for each OS’s and computer architecture, Java
code is compiled into Byte codes. With other
36
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Languages, the program code is compiled into a language that the computer can understand.
The problem is that other computers with different machine instruction set cannot understand that
language. Java code on the other hand is compiled into Byte-Code rather than a machine language.
These byte codes go to the JVM, which executes them directly or translates them into the language
that is understood by the machine running it.
In summary, these means that with the JDBC API extending Java, a programmer writing
Java code can access all the major RDBMS on any platform that supports the JVM.
2. JAVA IS OBJECT-ORIENTED:
Object-Oriented Languages use the paradigm of classes. In simplest term, a class includes
both the data and the functions to operate on data. You can create an instance of a class, also called
an object, which will have all the data members and functionality of its class. Because of this, you
can think of a class as being like template, with each object being a specific instance of a particular
type of class.
The class paradigm allows one to encapsulate data so that specific data values are those
using the data cannot see the function implementation. Encapsulation makes it possible to make the
changes in code without breaking other programs that use that code.
If for example, the implementation of a function is changed, the change is invisible to any
programmer who invokes that function, and does not affect his/her program, except hopefully to
improve it.
Java includes inheritance, or the ability to derive new classes from existing classes. The
derived class, is also called as Sub-Class, inherits all the data in the functions of the existing class.
37
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
To code, edit, debug and test the java programs, one needs to have a java development
environment. At the minimum this will consists of a java compiler interpreter and applet viewer
where applets can be tested. Sun’s java development kit (JDK) latest version is 2.2 can be freely
downloaded from the Internet. Java compiler is available on DOS, Win95, WIN’NT, Solaris and
MAC etc.
Data flow diagram is a graphical tool used to describe analyze the movement of data
through a system manual or automated including the processes, stores of data, and delays in the
system.
Data flow diagrams are the central tool and basis for form which other components are
developed. The data flow diagram is also known a data flow graph or bubble chart.
AWT stands for Abstract Window Tool Kit. It is a portable GUI library between Solaris and
Windows 95/NT and Mac System 7.X (soon) for stand-alone applications and/or applets. Since it
can be used in applets it can be used on IRIX, SunOS, HP/UX, Linux which Netscape 2.0 supports.
The Abstract Window Toolkit provides many classes for programmers to use. It is your
connection between your application and the native GUI. The AWT hides you from the underlying
details of the GUI your application will be running on and thus is at very high level of abstraction.
It takes the lowest common denominator approach to retain portability. No floating toolbars or
Balloon help here.
It is a Java package and can be used in any Java program by importing java.awt.* via
the import keyword. The documentation for the package is available at the Java homepage . The
package will be covered briefly as this document is not considered advanced material because it
does not discuss Peers, Image Consumers/Producers, Toolkits and other advanced AWT ilk. It is
recommended you look at the source code to see how the AWT really works.
The Abstract Window Toolkit supports GUI Java programming. It is a portable GUI library for
stand-alone applications and/or applets. The Abstract Window Toolkit provides the connection
between your application and the native GUI. The AWT provides a high level of abstraction for
38
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
your Java program since it hides you from the underlying details of the GUI your program will be
running on.
39
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Swing implements a set of GUI components that build on AWT technology and provide a
pluggable look and feel. Swing is implemented entirely in the Java programming language, and is
based on the JDK 1.1 Lightweight UI Framework. Swing is a part of JFC (Java Foundation Classes)
that is used to create GUI application. It is built on the top of AWT and entirely written in java.
40
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Swing components do not depend on peers to handle their functionality. Thus, these
components are often called "lightweight" components.
There are, of course, both pros and cons to using either set of components from the JFC in
your Java applications. Here is a summary:
AWT:
Pros:
Cons:
Portability: use of native peers creates platform specific limitations. Some components
may not function at all on some platforms.
Third Party Development: the majority of component makers, including Borland and
Sun, base new component development on Swing components. There is a much smaller
41
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
set of AWT components available, thus placing the burden on the programmer to create
his or her own AWT-based components.
Features: AWT components do not support features like icons and tool-tips.
Swing:
Pros:
Portability: Pure Java design provides for fewer platform specific limitations.
Behavior: Pure Java design allows for a greater range of behavior for Swing
components since they are not limited by the native peers that AWT uses.
Features: Swing supports a wider range of features like icons and pop-up tool-tips
for components.
Vendor Support: Swing development is more active. Sun puts much more energy
into making Swing robust.
Look and Feel: The pluggable look and feel lets you design a single set of GUI
components that can automatically have the look and feel of any OS platform
(Microsoft Windows, Solaris, Macintosh, etc.). It also makes it easier to make global
changes to your Java programs that provide greater accessibility (like picking a hi-
contrast color scheme or changing all the fonts in all dialogs, etc.).
Cons:
Applet Portability: Most Web browsers do not include the Swing classes, so the Java plug
in must be used.
Performance: Swing components are generally slower and buggier than AWT, due to
both the fact that they are pure Java and to video issues on various platforms. Since
Swing components handle their own painting (rather than using native API's like DirectX
on Windows) you may run into graphical glitches.
Look and Feel: Even when Swing components are set to use the look and feel of the OS
they are run on, they may not look like their native counterparts.
42
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
platform).
For most any other Java GUI development you will want to use Swing components. Also
note that the Borland value-added components included with JBuilder, like dbSwing and JBCL,
are based on Swing components so if you wish to use these components you will want to base
your development on Swing.
43
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
4.7.1 Android:
Android is a mobile operating system initially developed by Android Inc. Android was
purchased by Google in 2005.[4] Android is based upon a modified version of the Linux kernel.
Google and other members of the Open Handset Alliance collaborated to develop and release
Android to the world.[5][6] The Android Open Source Project (AOSP) is tasked with the
maintenance and further development of Android.[7] Unit sales for Android OS Smartphone ranked
first among all Smartphone OS handsets sold in the U.S. in the second and third quarters of 2010,
[8][9][10] with a third quarter market share of 43.6%.[11]
Android has a large community of developers writing application programs ("apps") that extend the
functionality of the devices. There are currently over 100,000 apps available for Android.[12][13]
Android Market is the online app store run by Google, though apps can be downloaded from third
party sites (except on AT&T, which disallows this). Developers write in the Java language,
controlling the device via Google-developed Java libraries.[14]
The unveiling of the Android distribution on 5 November 2007 was announced with the founding
of the Open Handset Alliance, a consortium of 79 hardware, software, and telecom companies
devoted to advancing open standards for mobile devices.[15][16] Google released most of the
Android code under the Apache License, a free software and open source license.[17]
The Android operating system 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[18] media framework, SQLite relational database management system, 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++.[19]
44
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
The fact that hitherto dedicated devices such as mobile phones can now count themselves
among the venerable general-computing platforms is great news for programmers. This new trend
makes mobile devices accessible through general-purpose computing languages, which increases
the range and market share for mobile applications.
The Android Platform embraces the idea of general-purpose computing for handheld devices. It is
a comprehensive platform that features a Linux-based operating system stack for managing devices,
memory, and processes. Android’s libraries cover telephony, video, graphics, UI programming, and
a number of other aspects of the device.
The Android SDK supports most of the Java Platform, Standard Edition (Java SE) except for the
Abstract Window Toolkit (AWT) and Swing. In place of AWT and Swing, Android SDK has its
own extensive modern UI framework. Because you’re programming your applications in Java, you
could expect that you need a Java Virtual Machine (JVM) that is responsible for interpreting the
runtime Java byte code. A JVM typically provides the necessary optimization to help Java reach
performance levels comparable to compiled languages such as C and C++. Android offers its own
optimized JVM to run the compiled Java class files in order to counter the handheld device
limitations such as memory, processor speed, and power. This virtual machine is called the Dalvik
virtual machine.
The familiarity and simplicity of the Java programming language coupled with Android’s extensive
class library makes Android a compelling platform to write programs for.
Let us look at how Android arrived on the Mobile OS landscape. Mobile phones use a variety of
operating systems such as Symbian OS, Microsoft’s Windows Mobile, Mobile Linux,
iPhone operating system (based on Mac OS X), Moblin (from Intel), and many other proprietary
operating systems. So far no single operating system has become the de facto standard. The
available APIs and environments for developing mobile applications are too restrictive and seem to
fall behind when compared to desktop frameworks. This is where Google comes in. The Android
platform promised openness, affordability, open source code, and a high-end development
framework.
45
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Google acquired the startup company Android Inc. in 2005 to start the development of the
Android Platform The key players at Android Inc. included Andy Rubin, Rich Miner, Nick Sears,
and Chris White.
In late 2007, a group of industry leaders came together around the Android Platform to form the
Open Handset Alliance Some of the alliance’s prominent members are as follows:
Sprint Nextel
T-Mobile
Motorola
Samsung
Sony Ericsson
Toshiba
Vodafone
Google
Intel
Texas Instruments
Part of the alliance’s goal is to innovate rapidly and respond better to consumer needs, and its first
key outcome was the Android Platform. Android was designed to serve the needs of mobile
operators, handset manufacturers, and application developers. The members have committed to
release significant intellectual property through the open source Apache License, Version 2.0.
The Android SDK was first issued as an “early look” release in November 2007. In September
2008, T-Mobile announced the availability of T-Mobile G1, the first Smartphone based on the
Android platform. A few days after that, Google announced the availability of Android SDK
Release Candidate 1.0. In October 2008, Google made the source code of the Android platform
available under Apache’s open source license.
When Android was released, one of its key architectural goals was to allow applications to interact
with one another and reuse components from one another. This reuse not only applies to services,
46
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
but also to data and the user interface (UI). As a result, the Android platform has a number of
architectural features that keep this openness a reality.
Android has also attracted an early following because of its fully developed features to exploit the
cloud-computing model offered by web resources and to enhance that experience with local data
stores on the handset itself. Android’s support for a relational database on the handset also played a
part in early adoption.
In late 2008 Google released a handheld device called Android Dev Phone 1 that was capable of
running Android applications without being tied to any cell phone provider network. The goal of
this device (at an approximate cost of $400.00) was to allow developers to experiment with a real
device that could run the Android OS without any contracts. At around the same time, Google also
released a bug fix, version 1.1 of the OS, that is solely based on version 1.0. In releases 1.0 and 1.1
Android did not support soft keyboards, requiring the devices to carry physical keys. Android fixed
this issue by releasing the 1.5 SDK in April 2009, along with a number of other features, such as
advanced media-recording capabilities, widgets, and live folders.
4.8 Features:
4.8.1 Handset layouts : The platform is adaptable to larger, VGA, 2D graphics library, 3D
graphics library based on OpenGL ES 2.0 specifications, and traditional Smartphone layouts .
4.8.2 Storage: SQLite, a lightweight relational database, is used for data storage purposes
4.8.4 Messaging : SMS and MMS are available forms of messaging, including threaded text
messaging and now Android Cloud to Device Messaging Framework (C2DM) is also a part of
Android Push Messaging service.
47
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
4.8.5 Web browser : The web browser available in Android is based on the open-source WebKit
layout engine, coupled with Chrome's V8 JavaScript engine. The browser scores a 93/100 on the
Acid3 Test.
4.8.6 Java support : While Android applications are written in Java, there's no Java Virtual
Machine in the platform and Java byte code is not executed. Java classes get recompiled into Dalvik
executable and run on Dalvik virtual machine. Dalvik is a specialized virtual machine designed
specifically for Android and optimized for battery-powered mobile devices with limited memory
and CPU. J2ME support can be provided via third-party-application such as the J2ME MIDP
Runner.[67]
4.8.7 Media support Android supports : the following audio/video/still media formats: WebM,
H.263, H.264 (in 3GP or MP4 container), MPEG-4 SP, AMR, AMR-WB (in 3GP container), AAC,
HE-AAC (in MP4 or 3GP container), MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, BMP.[66]
4.8.8 Streaming media support : RTP/RTSP streaming (3GPP PSS, ISMA), HTML progressive
download (HTML5 <video> tag). Adobe Flash Streaming (RTMP) is supported through Adobe
Flash Player plugin. Apple HTTP Live Streaming is supported through stagefright media player by
default since 2.3(Gingerbread). Microsoft Smooth Streaming is planned to be supported through the
awaited port of Silverlight plugin to Android. Adobe Flash HTTP Dynamic Streaming is planned to
be supported through an upgrade of the Flash plugin.
4.8.9 Additional hardware support : Android can use video/still cameras, touch screens, GPS,
accelerometers, gyroscopes, magnetometers, proximity and pressure sensors, thermometers,
accelerated 2D bit blits (with hardware orientation, scaling, pixel format conversion) and
accelerated 3D graphics.
4.8.10 Development environment : Includes a device emulator, tools for debugging, memory and
performance profiling. The integrated development environment (IDE) is Eclipse (currently 3.4 or
3.5) using the Android Development Tools (ADT) Plugin.
4.8.11 Market: Like many phone-based application stores, the Android Market is a catalog of
applications that can be downloaded and installed to target hardware over-the-air, without the use of
a PC. Originally only free applications were supported. Paid-for applications have been available on
48
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
the Android Market in the United States since 19 February 2009.[68] The Android Market has been
expanding rapidly. As of August 3, 2010, it had over 100,000 Android applications for download.
[69] There are other markets, such as SlideME and Getjar. Multi-touch Android has native support
for multi-touch which was initially made available in handsets such as the HTC Hero. The feature
was originally disabled at the kernel level (possibly to avoid infringing Apple's patents on touch-
screen technology).[70] Google has since released an update for the Nexus One and the Motorola
Droid which enables multi-touch natively.[71]
4.8.12 Multi-touch : Android has native support for multi-touch which was initially made
available in handsets such as the HTC Hero. The feature was originally disabled at the kernel level
(possibly to avoid infringing Apple's patents on touch-screen technology).[70] Google has since
released an update for the Nexus One and the Motorola Droid which enables multi-touch natively.
[71]
4.8.13 Bluetooth: Support for A2DP and AVRCP were added in version 1.5;[40] sending files
(OPP) and accessing the phone book (PBAP) were added in version 2.0;[46] and voice dialing and
sending contacts between phones were added in version 2.2.[51]
4.8.14 Video calling : The mainstream Android version doesn't support video calling,[72] however
some handsets could have a customized version of the operating system which supports it, either via
UMTS network (like the Samsung i9000 Galaxy S) or over IP.
Voice based features : Google search through Voice is available as Search Input since initial
release.[74] Also launched Voice actions supported on Android 2.2 onwards.
49
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
The Android OS can be used as an operating system for cellphones, netbooks and tablet
PCs, including the Dell Streak, Samsung Galaxy Tab and other devices.[76][77]
The world's first TV running Android, called Scandinavia, has also been launched by the company
People of Lava.[78]
The first commercially available phone to run the Android operating system was the HTC Dream,
released on 22 October 2008.[79]
The early feedback on developing applications for the Android platform was mixed.[80]
Issues cited include bugs, lack of documentation, inadequate QA infrastructure, and no public issue-
tracking system. (Google announced an issue tracker on 18 January 2008.)[81] In December 2007,
MergeLab mobile startup founder Adam MacBeth stated, "Functionality is not there, is poorly
documented or just doesn't work... It's clearly not ready for prime time."[82] Despite this, Android-
targeted applications began to appear the week after the platform was announced. The first publicly
available application was the Snake game.[83][84] The Android Dev Phone is a SIM-unlocked and
hardware-unlocked device that is designed for advanced developers. While developers can use
regular consumer devices purchased at retail to test and use their applications, some developers may
choose not to use a retail device, preferring an unlocked or no-contract device.
The Android software development kit (SDK) includes a comprehensive set of development
tools.[85] These include a debugger, 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.4.9 or later,
Windows XP or later. The officially supported integrated development environment (IDE) is
Eclipse (currently 3.4 or 3.5) using the Android Development Tools (ADT) Plugin, though
50
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
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).[86]
A preview release of the Android SDK was released on 12 November 2007. On 15 July
2008, the Android Developer Challenge Team accidentally sent an email to all entrants in the
Android Developer Challenge announcing that a new release of the SDK was available in a
"private" download area. The email was intended for winners of the first round of the Android
Developer Challenge. The revelation that Google was supplying new SDK releases to some
developers and not others (and keeping this arrangement private) led to widely reported frustration
within the Android developer community at the time.[87]
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.
[88] On 23 September 2008 the Android 1.0 SDK (Release 1) was released.[89] According to the
release notes, it included "mainly bug fixes, although some smaller features were added". It also
included several API changes from the 0.9 version. Multiple versions have been released since.[90]
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.[91]
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[92] (compiled byte code files called Dalvik executable), resource files, etc.
51
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
On 12 July 2010 Google announced the availability of App Inventor for Android, a Web-
based visual development environment for novice programmers, based on MIT's Open Blocks Java
library and providing access to Android devices' GPS, accelerometer and orientation data, phone
functions, text messaging, speech-to-text conversion, contact data, persistent storage, and Web
services, initially including Amazon and Twitter.[97] "We could only have done this because
Android’s architecture is so open," said the project director, MIT's Hal Abelson.[98] Under
development for over a year,[99] the block-editing tool has been taught to non-majors in computer
science at Harvard, MIT, Wellsley, and the University of San Francisco, where Professor David
Wolber developed an introductory computer science course and tutorial book for non-computer
science students based on App Inventor for Android.
The Android Developer Challenge was a competition for the most innovative application for
Android. Google offered prizes totaling 10 million US dollars, distributed between ADC I and ADC
II. ADC I accepted submissions from 2 January to 14 April 2008. The 50 most promising entries,
announced on 12 May 2008, each received a $25,000 award to fund further development. It ended
in early September with the announcement of ten teams that received $275,000 each, and ten teams
that received $100,000 each. ADC II was announced on 27 May 2009. The first round of the ADC
II closed on 6 October 2009.[106] The first-round winners of ADC II comprising the top 200
applications were announced on 5 November 2009. Voting for the second round also opened on the
same day and ended on November 25. Google announced the top winners of ADC II on November
30, with SweetDreams, What the Doodle!? and WaveSecure being nominated the overall winners of
the challenge.
Google has also participated in the Android Market by offering several applications for its
services. These applications include Google Voice for the Google Voice service, Sky Map for
watching stars, Finance for their finance service, Maps Editor for their MyMaps service, Places
Directory for their Local Search, Google Goggles that searches by image, Gesture Search for using
52
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
finger written letters and numbers to search the contents of the phone, Google Translate, Google
Shopper, Listen for podcasts and My Tracks, a jogging application.
In August 2010, Google launched "Voice Actions for Android",[109] which allows users to search,
write messages, and initiate calls by voice.
4.11 Coding:
package org.example.touch;
import android.app.Application;
import android.util.Log;
import java.net.*;
53
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
super.onCreate();
cThread.start();
client.sendMessage(message);
if(connected){
client.closeSocket();
54
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
try{
serverAddr = InetAddress.getByName(ip);
serverPort = port;
try {
55
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
socket.setSoTimeout(1000);
connected = testConnection();
if(connected)
surveyConnection();
catch (Exception e) {
try {
buf = message.getBytes();
socket.send(out);
network_reachable = true;
56
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
if(e.getMessage().equals("Network unreachable")){
network_reachable = false;
closeSocketNoMessge();
socket.close();
connected = false;
sendMessage(new String("Close"));
socket.close();
connected = false;
try {
57
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Log.d("Testing", "Sending");
socket.send(out);
Log.d("Testing", "Sent");
try{
Log.d("Testing", "Receiving");
socket.receive(in);
Log.d("Testing", "Received");
return true;
58
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
int count = 0;
while(connected){
try{Thread.sleep(1000);}
catch(Exception e){}
if(!testConnection())
count++;
else
count = 0;
if(count == 3){
closeSocket();
return;
59
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
package org.example.touch;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View.OnTouchListener;
import android.view.View.OnKeyListener;
import android.view.*;
import android.widget.Button;
import android.widget.EditText;
import android.text.Editable;
60
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
import android.text.TextWatcher;
import android.view.inputmethod.InputMethodManager;
import android.content.Context;
int lastXpos = 0;
int lastYpos = 0;
Thread checking;
super.onCreate(savedInstanceState);
setContentView(R.layout.control);
61
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
left.setWidth(width/2);
right.setWidth(width/2);
touchView.setOnTouchListener(this);
editText.setOnKeyListener(this);
editText.addTextChangedListener(new TextWatcher(){
Log.d("seachScreen", ""+s);
s.clear();
}
62
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Log.d("seachScreen", "beforeTextChanged");
try{
char c = s.charAt(start);
appDel.sendMessage("KEY"+delim+c);
catch(Exception e){}
});
super.onStart();
63
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
sendToAppDel(new String("Mouse
Sensitivity!!"+appDel.mouse_sensitivity));
AppDelegate appDel =
((AppDelegate)getApplicationContext());
while(appDel.connected){
try{Thread.sleep(1000);}
catch(Exception e){};
if(!appDel.connected){
finish();
}).start();
64
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
@Override
mousePadHandler(event);
return true;
@Override
Log.d("ello", ""+event.getKeyCode());
appDel.sendMessage("S_KEY"+delim+event.getKeyCode());
return false;
65
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
if(appDel.connected){
appDel.sendMessage(message);
else{
finish();
// if a single touch
66
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
if(touchCount == 1){
switch(action){
case 0: sb.append("DOWN"+delim);
sb.append((int)event.getX()+delim);
sb.append((int)event.getY()+delim);
break;
case 1: sb.append("UP"+delim);
sb.append(event.getDownTime()+delim);
sb.append(event.getEventTime());
break;
case 2: sb.append("MOVE"+delim);
sb.append((int)event.getX()+delim);
sb.append((int)event.getY());
break;
default: break;
67
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
// if two touches
sb.append("SCROLL"+delim);
if(action == 2){
sb.append("MOVE"+delim);
sb.append((int)event.getX()+delim);
sb.append((int)event.getY());
else
sb.append("DOWN");
sendToAppDel(sb.toString());
68
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Log.d("eloo", "CLICKED");
sendToAppDel("CLICK"+delim+"LEFT");
sendToAppDel("CLICK"+delim+"RIGHT");
if(keyboard){
mgr.hideSoftInputFromWindow(editText.getWindowToken(), 0);
keyboard = false;
69
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
else{
mgr.showSoftInput(editText,
InputMethodManager.SHOW_IMPLICIT);
keyboard = true;
Log.d("SET", "Foucs");
4.11.2 Touch.java
package org.example.touch;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
70
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
import android.view.View;
import android.content.DialogInterface;
import android.widget.EditText;
import android.widget.SeekBar;
import android.util.Log;
@Override
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
71
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
ipField.setText("192.168.1.2");
portField.setText("5444");
@Override
return;
});
network_alert.setTitle("Network Unreachable");
72
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
@Override
return;
});
@Override
Log.d("RESUME", "RESUMED");
super.onResume();
alert.show();
appDel.stopServer();
@Override
73
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
super.onPause();
firstRun = false;
int s = sensitivity.getProgress();
appDel.mouse_sensitivity = Math.round(s/20) + 1;
if(!appDel.connected){
String serverIp;
int serverPort;
serverIp = ipField.getText().toString();
serverPort = Integer.parseInt(portField.getText().toString());
appDel.createClientThread(serverIp, serverPort);
int x;
74
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
for(x=0;x<4;x++){// every quarter second for one second check if the server is
reachable
if(appDel.connected){
x = 6;
try{Thread.sleep(250);}
catch(Exception e){}
if(!appDel.connected)
if(!appDel.network_reachable)
network_alert.show();
else
alert.show();
75
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
import java.awt.Robot;
import java.awt.MouseInfo;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
int lastXpos = 0;
int lastYpos = 0;
int lastScrollY;
76
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
public AutoBot(){
try{
if(tokens[0].equals("CLICK")){
clickMouse(tokens[1]);
mouse_sensitivity = Integer.parseInt(tokens[1]);
77
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
else if(tokens[0].equals("MOVE")){
moveMouse(deltaX, deltaY);
lastXpos = currXpos;
lastYpos = currYpos;
//screenCap();
else if(tokens[0].equals("DOWN")){
lastXpos = Integer.parseInt(tokens[1]);
lastYpos = Integer.parseInt(tokens[2]);
else if(tokens[0].equals("UP")){
78
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
else if(tokens[0].equals("SCROLL")){
if(tokens[1].equals("DOWN"))
lastScrollY = lastYpos;
else if(tokens[1].equals("MOVE")){
robot.mouseWheel(1);
lastScrollY = currYpos;
robot.mouseWheel(-1);
79
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
lastScrollY = currYpos;
//screenCap();
else if(tokens[0].equals("KEY")){
type(tokens[1].charAt(0));
else if(tokens[0].equals("S_KEY")){
if(special_key){
int key;
switch(key_code){
80
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
keyBoardPress(key);
special_key = false;
else
}catch(Exception e){}
img = robot.createScreenCapture(captureSize);
81
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
return img;
robot.mouseMove(current_x_local + x*mouse_sensitivity,
current_y_local + y*mouse_sensitivity);
int button;
if(which.equals("LEFT"))
button = InputEvent.BUTTON1_MASK;
82
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
robot.mousePress(button);
robot.mouseRelease(button);
robot.mouseWheel(notches);
switch (character) {
83
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
84
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
85
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
86
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
88
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
try{
robot.keyPress(key);
robot.keyRelease(key);
}catch(Exception e){}
try{
robot.keyPress(key);
robot.keyPress(key2);
robot.keyRelease(key2);
robot.keyRelease(key);
}catch(Exception e){}
}}
Chapter 5:
89
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
5 TESTING
5.1 SOFTWARE TESTING
Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and code generation.
5.1.1 TESTING OBJECTIVES
To ensure that during operation the system will perform as per specification.
TO make sure that system meets the user requirements during operation
To make sure that during the operation, incorrect input, processing and output will
be detected
To see that when correct inputs are fed to the system the outputs are correct
To verify that the controls incorporated in the same system as intended
Testing is a process of executing a program with the intent of finding an error
A good test case is one that has a high probability of finding an as yet undiscovered
error
The software developed has been tested successfully using the following testing strategies
and any errors that are encountered are corrected and again the part of the program or the procedure
or function is put to testing until all the errors are removed. A successful test is one that uncovers an
as yet undiscovered error.
Note that the result of the system testing will prove that the system is working correctly. It
will give confidence to system designer, users of the system, prevent frustration during
implementation process etc.,
90
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
White box testing is a testing case design method that uses the control structure of the
procedure design to derive test cases. All independents path in a module are exercised at least once,
all logical decisions are exercised at once, execute all loops at boundaries and within their
operational bounds exercise internal data structure to ensure their validity. Here the customer is
given three chances to enter a valid choice out of the given menu. After which the control exits the
current menu.
Black Box Testing attempts to find errors in following areas or categories, incorrect or
missing functions, interface error, errors in data structures, performance error and initialization and
termination error. Here all the input data must match the data type to become a valid entry.
Unit testing is essentially for the verification of the code produced during the coding
phase and the goal is test the internal logic of the module/program. In the Generic code
project, the unit testing is done during coding phase of data entry forms whether the functions
are working properly or not. In this phase all the drivers are tested they are rightly connected
or not.
91
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
All the tested modules are combined into sub systems, which are then tested. The goal
is to see if the modules are properly integrated, and the emphasis being on the testing
interfaces between the modules. In the generic code integration testing is done mainly on table
creation module and insertion module.
92
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
When a user tries to connect by submitting an incorrect port number then it displays an error
message “CONNECTION CAN’T BE ESTABLISHED”.
93
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
Chapter 6:
6 RESULT
6.1 PC IP Address
Android screens:
94
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
6.2 Java
Generate Ip address:
Chapter 7:
7 CONCLUSION:
95
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
7.1 FAQ’S:
The Abstract Window Toolkit provides many classes for programmers to use. It is your
connection between your application and the native GUI. The AWT hides you from the underlying
details of the GUI your application will be running on and thus is at very high level of abstraction.
Swing implements a set of GUI components that build on AWT technology and provide a
pluggable look and feel. Swing is implemented entirely in the Java programming language and is
based on the JDK 1.1 Lightweight UI Framework. Swing is a part of JFC (Java Foundation Classes)
that is used to create GUI application. It is built on the top of AWT and entirely written in java.
BIBILIOGRAPHY
Advanced Java Programming - Dietel and Dietel
www.eci.gov.in
www.google.com
www.apeci.com
96
Ideal Institute Of Technology
Remote Controlled Desktop Using Android
http://developer.android.com/index.html
http://www.android-trainer.com/
http://stackoverflow.com/
http://www.google.co.in/
97
Ideal Institute Of Technology