Vous êtes sur la page 1sur 114

1.

INTRODUCTION

1.1 Overview
Virtual Network Computing is platform-independent a VNC viewer on one operating system may connect to a VNC server on the same or any other operating system. There are clients and servers for many GUI-based operating systems and for Java. Multiple clients may connect to a VNC server at the same time. Popular uses for this technology include remote technical support and accessing files on one's work computer to the mobile device, or vice verses. VNC (Virtual Network Computing) is an open-source, cross-platform protocol for viewing GUI desktops on remote machines within a LAN or over a WAN/Internet connection. The machine that the user is sitting at is referred to as the client, and the remote machine being controlled is referred to as the server. Viewing entails sending screen updates from the server to the client; controlling sends mouse and keyboard from the client to the server. The nature of VNC connections is such that any machine running an operating system may act as either client or server simply by running the appropriate executable program, and the client and server do not need to be running on the same operating system.

1.2 Purpose
The Purpose of this project is to provide a (cross-platform)platform

independent software (platform independent means which can runs on any O.S )product which enables viewing and controlling GUI desktops on remote machines on a network, either within a LAN or over a WAN/Internet connection.

1.3 Scope
The scope of the Virtual network computing is used to allow the user to view a computers desktop display from different locations. The user can view the display not only on the mobile it is running from, but also via Internet access and from a variety of different machines like robot, computer etc in different locations. Virtual network computing is a truly independent system i.e., we can access the desktop through our mobile which can either be in the next room in your office or even in your home. It is excellent for systems testers who need to keep an eye on programs and operations as they are running on different platforms and also act as a helpdesk resolver for the customers. The scope of the project is divided into three major sections.

1) Learning core fundamentals of Java, Mobile and OpenGL ES API. Preparing documentation/samples on same and preparing material on their findings. 2) Researching on Googles Android, the Mobile development platform, and evaluating various options of implementing in Android platform. Listing out any limitations, advantages, disadvantages etc. 3) Last section would deal with design, development, testing and implementation of the vnc project.

1.4 Features
Accessing the files
Accessing the files, e-mail, documents, edit and saving

Friendly Interface
The user interface is extremely easy-to-use. You can start working immediately.

Full-screen View and Zooming

In full-screen mode you can see the remote screen on the entire screen of your device. Zoomed mode lets you see enlarged fragment of the desktop in more detail.

Direct input mode


You can use your mobile phone keyboard and a track wheel instead of computer keyboard and a mouse.

Mouse and Keyboard options.


Turn Mouse option on for selection and Keyboard option for typing.

Powerful Security
SSH secure connection and encryption plug-ins are used to maintain the IP Address

Wi-Fi Connection
You can connect to the computer with Wi-Fi when you are within an area of Wi-Fi coverage. (For models that support Wi-Fi)

2. SYSTEM ANALYSIS

2.1

Analysis
Analysis means literally to break a complex problem down into smaller, more

manageable "independent" parts for the purposes of examination; with the hope that solving these smaller parts will lead to a solution of the more complex problem as well. Analysis can be of two types. 1. Requirement analysis. 2. Design analysis.

2.1.1 Requirement Analysis


A requirement is a feature that must be included in the system. Before the actual design and implementation start, getting to know the system to be implemented is of prime importance. Main emphasis should be on The inputs to the system. The outputs expected from the system. The people involved in the working of the system. The volume of DATA (INPUTS) and the amount of INFORMATION (outputs) that will be involved.

Systematic requirements analysis is also known as requirements engineering. It is sometimes referred to loosely by names such as requirements gathering, requirements capture, or requirements specification. The term "requirements analysis" can also be
6

applied specifically to the analysis proper (as opposed to elicitation or documentation of the requirements, for instance). Requirements must be measurable, testable, related to identified business needs or opportunities, and defined to a level of detail sufficient for system design.

2.1.2 Design Analysis


A diagram is the graphical presentation of a set of elements, most often rendered as a connected graph of vertices (things) and arcs (relationships). You draw diagrams to visualize a system from different perspectives, so a diagram is a projection into a system. For all but the most trivial systems, a diagram represents an elided view of the elements that make up a system. The same element may appear in all diagrams, only a few diagrams (the most common case), or in no diagrams at all (a very rare case). In theory, a diagram may contain any combination of things and relationships.

2.1.2 The SDLC Waterfall Model


SDLC Model The Software Development Life Cycle is a logical systematic process used to develop software and information systems through planning, analysis, design, implementation and support. Through these five steps softwares are built that both satisfy a user's needs and meet a company's expectations. The five traditional steps to the Software Development Life Cycle are: Planning This initial phase starts by defining the need. The purpose of the planning phase is to identify clearly the nature and scope of the business opportunity or problem by performing a preliminary investigation. This entails investigating their current system and what they hope to have in the future. The end product of this phase is a document that defines what kind of
7

cost they will be incurring with implementation of the new system and what kind of benefit they should expect to receive. Analysis In the analysis phase we get further information about what the users want and build more in-depth models of what they can expect to achieve with their new system. We should further understand the business requirement and then create a logical model of the new system. The end product for the analysis phase is the system requirements document. Design This is when the project really starts to take form. Engineers plan out all the inputs, outputs, interfaces, processes for the project and create the system design specification from this data. Then the specification is taken to users and management to get their opinion on if the team has taken everything into account an if the new system adequately addresses all their concerns. Implementation The implementation phase is the phase in which the customer gets to see more than just documents describing their system. The engineers and designers construct the new system and begin testing it and documenting it. Typically the team will make a prototype model in either this phase or the design phase to ensure that the system will meet the needs of the customer. Then after everyone is satisfied that the system is ready they will install the product and convert the customers existing format over to the new version. And the customer does a final evaluation to determine if the system is working as they expected and if that the costs and benefits are as they had planned.

Support In this, the final phase, the team maintains the system and updates it as necessary to keep up to date with its environment. The staff will also fix minor flaws in the program that were not caught in the other phases. Sometime after the project reaches the support phase the customer will decide that it is time for another upgrade of their system, which restarts the process again.

The relationship of each stage to the others can be roughly described as a waterfall, where the outputs from a specific stage serve as the initial inputs for the following stage.

PROCESS VISIBILITY
Good visibility, each activity produces some deliverable

2.2

Existing System
VNC is remote control software which allows you to view and fully interact with one

computer desktop (the "VNC server") using a simple program (the "VNC viewer") on another computer desktop anywhere on the Internet. The two computers don't even have to be the same type, so for example we can use VNC to view a Windows Vista desktop at the office on a Linux or Mac computer at home.

2.2.1 Problem Statement


The problem statement, sometimes referred to as the needs assessment, is a well documented, detailed description of the problem to be addressed and the need for the proposed project. The problem and need should be expressed in terms of the subjects or
10

beneficiaries of the proposed project, not in terms of the needs of the applicant organization. It should show a match between the sponsor's interests and priorities and the applicant's experience and skill

2.3

Proposed System
VNC viewer on one operating system may connect to a VNC server on the same or

any other operating system. There are clients and servers for many GUI-based operating systems and for Java. Multiple clients may connect to a VNC server at the same time. Popular uses for this technology include remote technical support and accessing files on the mobile from the desktop. VNC (Virtual Network Computing) allows full remote access of a computer, so that we can send information to the VNC server from your Android smart phone. The Android VNC Viewer, or vnc-viewer, works over 3G networks. When using the viewer, we will be able to see a smaller version of that computer's screen on the Android phone. Some screens are broken into smaller chunks for better viewing and memory purposes. By using android we can easily create the application and can be embedded into the other device and can access via internet or through LAN.

11

2.4

Feasibility Study
All projects are feasible if they have unlimited resources and infinite time. But the

development of software is plagued by the scarcity of resources and difficult delivery rates. It is necessary and prudent to evaluate the feasibility of a project at the earliest possible time. The three considerations are involved in the feasibility analysis.

2.4.1 Economic Feasibility


Economic feasibility attempts 2 weigh the costs of developing and implementing a new system, against the benefits that would accrue from having the new system in place. This feasibility study gives the top management the economic justification for the new system. This procedure is to determine the benefits and savings that are expected from a candidate system and compare with cost. If benefits outweigh cost then the decision is made to design and implement the system. Otherwise further justification or alterations in proposed system that have to be made if it is having a change of being approved .This is an ongoing effort that improves in accuracy of each phase of the system lifecycle. For my project I am not expecting any feasibility costs spent on this on this project because here I am using open source environments.

2.4.2 Operational Feasibility


Proposed project is beneficial only if it can be turned into information systems that will meet the organizations operating requirements. Simply stated, this test of feasibility asks if the system will work when it is developed and installed. People are inherently resistant to change and mobiles have been known to facilitate change. In my project a technical people require to configure the software and technical background is necessary to work on the sensors.
12

2.4.3 Technical Feasibility


Evaluating the technical feasibility is the trickiest part of a feasibility study. This is because, .at this point in time, not too many detailed design of the system, making it difficult to access issues like performance, costs on (on account of the kind of technology to be deployed) etc. A number of issues have to be considered while doing a technical analysis.

Understand the different technologies involved in the proposed system before commencing the project we have to be very clear about what are the technologies that are to be required for the development of the new system. Find out whether the organization currently possesses the required technologies. Is the required technology available with the organization.

The Technical feasibilities are important role in my project because here I am using android operating system.

13

3. SOFTWARE REQUIREMENT SPECIFICATION

3.1 Functional Requirements

Android APIs will be available on every Android phone, but there are a few APIs which have special concerns: the "optional" APIs.These are "optional" in the sense that a given handset may not support them fully, or even at all. For instance, a given handset may not have GPS or GPRS Mobile web services. In this case, the APIs for accessing these features will still be present, but they may not work in the same way. For instance, the Location API will still exist on devices without GPS, but there may simply be no installed provider, meaning that the API cant be usefully used.

3.1.1 Hardware Requirements


Processor Hard disk Drive RAM Keyboard Monitor : : : : : Pentium IV with 2 GHZ and higher 40GB 1GB 111keys Multimedia keyboard VGA 256 colors, 640*480(Resolution),14inches

14

Phone

Android Phone (Optional)

3.1.2 Software Requirements


OS Software : : Android, Windows XP, LINUX GPRS, Web services. Mobile IDE plug-in (Eclipse IDE 3.4 with android plugin) Language : Java (Multi-tier Technology). Android SDK, Eclipse 3.4

Development Tool :

3.2 Nonfunctional Requirements


3.2.1 Safety Requirements
Never use an unapproved battery since this could damage the phone and for battery and could cause the battery to explode. Do not dispose your battery by fire or with hazardous or flammable materials.Make sure that no sharp edged items such as animals teeth, nails come into contact with the battery. There is a risk of this causing a tire.

3.2.2 Security Requirements

15

Android is a multi-process system, where each application (and parts of the system) runs in its own process.Most security between applications and the system is enforced at the process level through standard Linux facilities, such as user and group IDs that are assigned to applications.Additional finer-grained security features are provided through a "permission" mechanism that enforces restrictions on the specific operations that a particular process can perform, and per-URI permissions for granting ad-hoc access to specific pieces of data. A central design point of the Android security architecture is that no application, by default, has permission to perform any operations that would adversely impact other applications, the operating system, or the user.This includes reading or writing the user's private data (such as contacts or e-mails), reading or writing another applications files, performing network access, keeping the device awake, etc.

3.3 Project Description


A Virtual Network Computing, or VNC, is an open-source, cross-platform software product which enables viewing and controlling GUI desktops on remote machines on a network, either within a LAN or over a WAN/Internet connection.

The mobile is referred as the client, and the remote machine being controlled is referred to as the server. Viewing entails sending screen updates from the server to the client; controlling sends mouse and keyboard from the client to the server.

The VNC protocol provides an excellent, lightweight means of remotely controlling GUI desktops across a network connection.

VNC Viewer
First open android-VNC-Viewer, we will see a connection configuration page. Here we can set up a connection with a VNC Server, or choose an already configured connection.
16

For configuration we require IP Address of the VNC Server.Apart from configuration we need nick name ,color format , port no, password etc

Nickname
For each configuration we can have a nickname which will make us easy to find in the list.

Password
If our VNC server is configured to require a password, enter that password . Most configuration settings are stored in a simple database on the device. The password will only be stored if we check, otherwise we have to re-enter it whenever we recall a configuration. Even if the password is not stored in the database, it will remain available on the page for as long as android VNC-viewer runs on our device.

Address
This is where you enter the DNS name or IP address of the computer running the VNC server to which you want to connect.

17

Port

Here we should enter the port number of the VNC server. The default port no is 5900.

Color Format
The client supports a number of color formats, which are specified by number of colors/number of bits per pixel. Formats with more bits per pixel provide greater fidelity to high color depth displays, but use more bandwidth (sometimes dramatically more because they don't compress as well) and more CPU on your Android device. Not all VNC servers support all color depths; OS/X Remote Desktop for example requires 24-bit color.

Use Local Mouse Pointer


Some VNC servers (notably OS/X desktop sharing) will not draw the mouse pointer on the client; it's hard to use them without knowing where the mouse is. Checking this option will cause Android-VNC-Viewer to draw a small square cursor at the mouse position (it's not the actual mouse cursor, but it's better than nothing).

Force Full-Screen Bitmap

18

The VNC client requires a bitmap for its representation of the display. For a VNC server serving a large display, this bitmap might require more memory than Android allows in an application. To work with these large displays, Android-VNC-Client breaks large display into smaller tiles and works with only one tile at a time. The menu on this page allows you to Delete unneeded connection configurations; to Save as Copy an existing connection to base a different configuration from it; or to open this Manual/Wiki.

VNC Client
After we press the connect button, Android-VNC-Viewer will try to connect to the specified VNC server. If it is able to handshake, authenticate and download the first frame, you will be able to see and control the served display. In general, VNC servers expect clients with a full keyboard, a mouse and a generously-sized screen. Because the Android device lacks these, Android-VNC-Client has some special adaptations to make it usable.

Send Keys
This opens the Special Keys dialog to let you configure and send special keys and combinations. For example to open the window option we can send the key as ctrl-F11.

19

Mouse
Warps the VNC mouse to the center of the portion of the display shown on your device.

Send Text
Opens a dialog that lets you enter a block of text that can then be sent to the server. Useful for phones without a physical keyboard.

Scaling
The served display can be shown on the Android device in three modes. You can switch between the modes with the Scaling (Menu-Z) menu item. Zoomable is the default mode with the latest version of android-vnc-viewer. It allows you to select one of a number of zoom levels on the fly, so you can see more of your screen or zoom in for more accurate touch contro

3.4

VNC Benefits
There are many benefits to using a virtual network computing (VNC) application.

One of the primary benefits is being able to access, operate, and configure a computer remotely from mobile. This can be accomplished via the Internet and/or a local area
20

connection.Another benefit is for server administrators to monitor and maintain a server remotely.

Admin Browser Employees workstation

There are many potentials with a VNC application. If a computer has a cellular modem and a VNC connection, then it can be mounted on a robot and controlled from another part of the world.

3.4.1 VNC Applications


Check-up emails and download.It can be used to support the mobile user, both for hot desking within the enterprise and also to provide remote access at home, or on the road.

A very common business application of VNC is in remote system administration, where it is used to allow administrators to take control of employee machines to diagnose and
21

fix problems, or to access and administer server machines without making a trip to the console

VNC is widely used in educational contexts, for example to allow a distributed group of students simultaneously to view a computer screen being manipulated by an instructor, or to allow the instructor to take control of the students' computers to provide assistance. The system allows several connections to the same desktop, providing an invaluable tool for collaborative or shared working in the workplace or classroom.

3.5

Modules And There Description

3.5.1 Creation Of The Connection

The first part of our application is to create the connection between the system and the mobile in which our application has deployed which is nothing but providing the connection something like LAN/Internet connection. We can also create the connection between the system and the mobile by using wi-fi connection. The term "wifi" refers to certain kinds of wireless local area networks, or WLAN (as opposed to LAN, or computers that are networked together with wires).

22

Travelers with PDA's (like Blackberries) and other handheld devices or laptops with wireless cards can connect to the internet via wifi. A wireless card is like a modem without a phone line . Wifi hotspots are places where you can find wifi, free or paid. internet cafes are likely wifi hotspots, and many airports, hotels and bars have wifi hotspots.

3.5.2 Installing VNC Server


. If we want to access the desktop through mobile then it is mandatory that the mobile is installed with vnc viewer and the remote desktop which we want to access should be installed with vnc server. VNC Server allows us to control the computer within our android phone over internet or Wifi. VNC stands for Virtual Network Computing which is the graphical desktop sharing system that uses the ssh tunnel to remotely control the computer. For the remote desktop, VNC server called as Tight VNC server is installed which allows us to remotely control the laptop or desktop computer through our Android phone. With VNC Viewer for Android, users can view and interact with their desktop, run applications and access files, exactly as they would if they were sitting in front of the
23

computer itself. The app gives individuals the freedom to access their computer whilst travelling or as a tool for business users such as IT help-desk staff, enabling them to remotely support colleagues or access servers for troubleshooting wherever they are, reducing downtime and out of hours trips to the office. It can connect to any Mac OS X computer, and to any Windows, Linux, or UNIX computer running VNC-compatible Server technology.

The vnc viewer and vnc server softwares can be freely downloaded from internet.

3.5.3 Establishing The Connection

The third part of our application is to establishing the connection between the system where vnc has installed and to your mobile by providing the IP address and password of that particular server. VNC uses a random challenge-response system to provide the basic authentication that allows you to connect to a VNC server. This is reasonably secure; the password is not sent over the network. Once we are connected, however, traffic between the viewer and the server is unencrypted, and could be snooped by someone with access to the intervening network. Therefore for security it is important to 'tunnel' the VNC protocol through some more secure channel such as SSH.

24

SSH normally just provides you with a 'Secure Shell' - i.e. a login window to a remote machine. All traffic is encrypted between the two machines using public key encryption techniques, making it really very difficult for anyone else to spy on it.

3.5.4 Providing The Options


The fourth part of our application is to display the options in order to access the system through your mobile. The following options are shown when we open the vnc viewer.

25

Nickname

Each configuration you create can have a nickname which will make it easy to find in the list. Enter that name here.

Password

If your VNC server is configured to require a password, enter that password here. Most configuration settings are stored in a simple database on your device. The password will only be stored if we check Keep; otherwise, we will have to re-enter it when we recall a configuration. Even if the password is not stored in the database, it will remain available on the page for as long as android-vnc-viewer runs on our device.

Address This is where you enter the DNS name or IP address of the computer running the VNC server to which we want to connect

3.5.5 Accessing System


26

The fifth part of our application is to access the system by providing name, IP address, password and default port number(5900). Users can view and interact with their desktop, run applications and access files, exactly as they would if they were sitting in front of the computer itself. The app gives individuals the freedom to access their computer whilst travelling or as a tool for business users such as IT help-desk staff, enabling them to remotely support colleagues or access servers for troubleshooting wherever they are, reducing downtime and out of hours trips to the office. The app offers a trackpad-style mouse for precision interactions and users can apply familiar touch, tap and drag gestures to control the computer, pinching to zoom into a specific area of the desktop or zooming out to see the entire screen. Text can be entered using the onscreen keyboard and a scrolling key bar for non-character keys such as cursor keys and Shift, Ctrl, Alt and Delete. Android devices equipped with VNC Viewer can connect to any Windows, Mac OS X, Linux, or UNIX computer installed with and running a VNC compatible Server.

3.5.6 Terminating The Connection


27

The sixth part of our application is to terminate the connection between the system and mobile. To disconnect from the remote machine, simply close the VNC window on the local machine. A prompt will display the notification that the connection will be closed. Click OK

28

4. TECHNOLOGY OVERVIEW

4.1

Overview Of Android

4.1.1 Introduction to Android


Android is a mobile operating system initially developed by Android Inc. Android was purchased by Google in 2005.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. The Android Open Source Project (AOSP) is tasked with the maintenance and further development of Android. Unit sales for Android OS smartphones ranked first among all Smartphone OS handsets sold in the U.S. in the second and third quarters of 2010. Being an open system based on modified Linux kernel it has been widely accepted by the developer community and presents a golden opportunity to create products and services for this amazing platform. 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.

4.1.2 What is Android?


Android is a software stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language. The Android platform is a software stack for mobile devices including an operating system, middleware and key applications. Developers can create applications for the platform
29

using the Android SDK. Applications are written using the Java programming language and run on Dalvik, a custom virtual machine designed for embedded use, which runs on top of a Linux kernel. An embarrassing bug found on the G1 Phone has been fixed by Google. After starting up the phone if a user then typed reboot, the phone would reboot.The bug was found accidentally by a user who happened to type Reboot into his phone. Android is an open source platform and it is released under open source license. 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 media framework, SQLite relational database management system, OpenGL ES 2.0 3D graphics API, WebKit layout engine, SGL graphics engine, SSL. ANDROID IS Open software platform for mobile development A complete stack OS, Middleware, Applications An Open Handset Alliance (OHA) project Powered by Linux operating system
Fast application development in Java

30

Open Handset Alliance

Google and all the other companies collaborated together and release android to the world.

4.1.3 WHY ANDROID?

A mobile operating system, also known as a mobile OS, a mobile platform, or a handheld operating system, is the operating system that controls a mobile device or information appliancesimilar in principle to an operating system such as Windows, Mac OS, or Linux that controls a desktop computer or laptop. However, they are currently somewhat simpler, and deal more with the wireless versions of broadband and local connectivity, mobile multimedia formats, and different input methods.

The SmartPhone Landscape


Nokia started the SmartPhone revolution earlier this decade, since then the SmartPhones market has grown from strength to strength. However, with Nokias Symbian OS quickly loosing market share - Blackberry, Android and iPhone are now are the biggest

31

players in the industry. Android being open source and a wide hardware support is quickly gaining ground for smart phones as well as netbooks and recently, tablet PCs. TYPES OF MOBILE OPERATING SYSTEM

All above operating systems is not an opensource except android .By using an open source operating system user can develop their own applications and can deploy on android mobile phones. Some of the currently develop POPULAR android mobile phones in 2011 are as follows

Samsung Galaxy

Qwerty Android Phones In India

32

Motorola-Social Netrworking

Huawei (multi colors)

4.1.4 Android Features Software Features


Integrated browser based on the open source WebKit engine SQLite for relational data storage Media support for common audio, video, and still image formats(MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) Dalvik Virtual Machine optimized for mobile devices

Hardware Features
Cellular networking : GSM, EDGE, 3G (hardware dependent) LAN : Bluetooth, and Wi-Fi (hardware dependent) Graphics Hardware Acceleration

33

Camera, GPS and Compass (hardware dependent) Touch screen and accelerometer for motion sensing
Rich development environment including a device emulator, tools for debugging,

memory and performance profiling, and a plugin for the Eclipse IDE

4.1.6 ANDROID ARCHITECTURE

Linux Kernel
Android relies on Linux version 2.6 for core system services such as security,memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.

34

Libraries
Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework. Some of the core libraries are listed below:

System C library Media Libraries


The libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, MP3, JPG, and PNG

Surface Manager
Manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple applications

LibWebCore
A modern web browser engine which powers both the Android browser and an embeddable web view

SQLite
A powerful and lightweight relational database engine available to all applications .

35

Android Runtime
Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language. Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx" tool. The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.

Application Framework
Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user.

Underlying all applications is a set of services and systems, including:


A rich and extensible set of Views that can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browser

Content Providers
That enable applications to access data from other applications (such as Contacts), or to share their own data

36

Resource Manager
It provides access to non-code resources such as localized strings, graphics, and layout files

Notification Manager
It enables all applications to display custom alerts in the status bar

Activity Manager
It manages the life cycle of applications and provides a common navigation back stack

Applications
Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language. Built in and user apps Can replace built in apps

4.1.7 ANDROID VERSIONS


Google has released the Android platform under following versions Android 1.0 Android 1.1 Android 1.5 Android 1.6 Android 2.1
37

Android 2.2

The Different Versions Of Android Mobile Devices Are Given Below

38

Android 2.3 version The android 2.3 version is a present stable version.

39

Android 3.0 Honeycomb Will Not Need Physical Buttons

4.1.7 Android Emulator


40

The Android SDK includes a mobile device emulator -- a virtual mobile device that runs on your computer. The emulator lets you prototype, develop, and test Android applications without using a physical device.

The Android emulator mimics all of the hardware and software features of a typical mobile device, except that it can not receive or place actual phone calls. It provides a variety of navigation and control keys, which you can "press" using your mouse or keyboard to generate events for your application. It also provides a screen in which your application is displayed, together with any other Android applications running. To let you model and test your application more easily, the emulator supports Android Virtual Device (AVD) configurations. AVDs let you specify the Android platform that you want to run on the emulator, as well as the hardware options and emulator skin files that you want to use. Once your application is running on the emulator, it can use the services of the

41

Android platform to invoke other applications, access the network, play audio and video, store and retrieve data, notify the user, and render graphical transitions and themes. The emulator also includes a variety of debug capabilities, such as a console from which you can log kernel output, simulate application interrupts (such as arriving SMS messages or phone calls), and simulate latency effects and dropouts on the data channel.

The Android Emulator Default Home Screen (Version 1.5)

EMULATOR Google API Level 4(Version2.2)

For our vnc application to run we will use Google Maps version which include Android version 2.2.

4.1.8 Software Development Kit (SDK)


42

The Android software development kit (SDK) includes a comprehensive set of development tools.These include a debugger, libraries, a handset emulator (based on QEMU), documentation, sample code, and tutorials. Currently supported development platforms include computers running Linux (any modern desktop Linux distribution), Mac OS or later, Windows XP or later.

43

The Android SDK includes a variety of custom tools that help you develop mobile applications on the Android platform.Three of the most significant tools are: Android Emulator A virtual mobile device that runs on our computer -use to design, debug, and test our applications in an actual Android run-time environment Android Development Tools Plugin The Eclipse IDE - adds powerful extensions to the Eclipse integrated environment

Dalvik Debug Monitor Service (DDMS) Integrated with Dalvik -this tool let us manage processes on an emulator and assists in debugging

4.1.9 Eclipse 3.4


The officially supported integrated development environment (IDE) is Eclipse (currently 3.4 or 3.5) using the Android Development Tools (ADT) Plugin, though developers may use any text editor to edit Java and XML files then use command line tools (Java Development Kit and Apache Ant are required) to create, build and debug Android applications as well as control attached Android devices . Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.

ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application.

44

An open-source Java IDE and platform for rich client applications Eclipse is an open source platform-independent software framework for delivering what the project calls or is knownas"rich-clientapplications"

Start your eclipse and create a work directory if not already created.

You will see the eclipse ID as shown in the figure below.

45

The left side of the UI shows the projects created by you. The central UI will show the code written by you and the right end of the figure shows the task lists. The lower end of it shows the console and logger which is very useful while debugging.

4.1.10 Building Blocks For An Android Application


Android application development is done in java programming language. The compiled code is bundled into an Android package which can be signed and installed on the mobile phone. The Android application can be considered as a series of processes and the control moves from one process to another creating an application for the user to interact with. Hence there is no single entry point for Android application like main but rather there are components which can start as the need arises. These components can be classified into four parts: So,There are four building blocks for an Android application:

Activity
An activity is use to present visual interface to the user. We can have many activities based on the user interfaces used by our application but each one of them is a subclass of the Activity class. Each activity has a separate window to draw the visual component but if required it can use more than one window also.

Services

46

A services does not have a visual component but runs in the background and carries out some background process while the other visual components are running in the foreground. A service will inherit Service base class.

Intent An message object that we can use to launch or communicate with other applications/activities asynchronously. An application sends an Intent to the Android system, rather than sending it directly to another application/activity. The application can send the Intent to a single target application or it can send it as a broadcast, which can in turn be handled by multiple applications sequentially.

Content Providers
A data-abstraction layer that you can use to safely expose your application's data to other applications. This provides specific set of data from one application to other applications. The content providers extend ContentProvider base class.

These are the most important parts of the Android APIs:


47

The list below defines some of the basic terminology of the Android platform. Notifications Notification is a small icon that appears in the status bar(SMS messages) for alerting the user Services An object of class Service that runs in the background (without any UI presence) to perform various persistent actions, such as playing music or monitoring network activity. .apk extension Android application package file. Each Android application is compiled and packaged in a single file that includes all of the application's code (.dex files), resources, assets, and manifest file. The application package file can have any name but must use the .apk extension. For example: myExampleAppname.apk. For convenience, an application package file is often referred to as an ".apk". .dex extension Compiled Android application code file.Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into a single .apk file on the device. .dex files can be created by automatically translating compiled applications written in the Java programming language. Application A collection of one or more activities, services, listeners, and intent receivers. From a source file perspective, an Android application consists of code, resources, assets, and a single manifest. During compilation, these files are packaged in a single file called an application package file (.apk). Dalvik
48

The name of Android's virtual machine. The Dalvik VM is an interpreter-only virtual machine that executes files in the Dalvik Executable (.dex) format, a format that is optimized for efficient storage and memory-mappable execution. The virtual machine is register-based, and it can run classes compiled by a Java language compiler that have been transformed into its native format using the included "dx" tool. The Dalvik core class library is intended to provide a familiar development base for those used to programming with Java Standard Edition, but it is geared specifically to the needs of a small mobile device. DDMS Dalvik Debug Monitor Service, a GUI debugging application included with the SDK.It provides screen capture, log dump, and process examination capabilities. If you are developing in Eclipse using the ADT Plugin, DDMS is integrated into your development environment. Drawable A compiled visual resource that can be used as a background, title, or other part of the screen. A drawable is typically loaded into another UI element, for example as a background image. A drawable is not able to receive events, but does assign various other properties such as "state" and scheduling, to enable subclasses such as animation objects or image libraries. Many drawable objects are loaded from drawable resource files xml or bitmap files that describe the image. Drawable resources are compiled into subclasses of android.graphics.drawable. Intent An message object that we can use to launch or communicate with other applications/activities asynchronously. An application sends an Intent to the Android system, rather than sending it directly to another application/activity. The application can send the Intent to a single target application or it can send it as a broadcast, which can in turn be handled by multiple applications sequentially.

49

Intent Filter A filter object that an application declares in its manifest file, to tell the system what types of Intents each of its components is willing to accept and with what criteria. Through an intent filter, an application can express interest in specific data types, Intent actions, URI formats, and so on. When resolving an Intent, the system evaluates all of the available intent filters in all applications and passes the Intent to the application/activity that best matches the Intent and criteria. Layout resource An XML file that describes the layout of an Activity screen. Android Manifest File An XML file that each application must define, to describe the application's package name, version, components (activities, intent filters, services), imported libraries, and describes the various activities, and so on.

4.1.11 Android Applications


There are over 1,00,000 applications available in android.such as

phone,email,sms,web -gaming,maps,social network

50

Initial screen

Map

Browser

The following figure shows the various applications in android phone

51

Some of them are as follows

Places Directory This is an awesome app for finding shops and services near your current location. From restaurants to movie theaters to medical facilities to taxis, this app is very accurate and takes advantage of the business information from Google Local.

52

Breadcrumbz Breadcrumbz seems to be a favorite and people who are better at understanding visual directions than written ones will love this application. Breadcrumbz gives the user picture-based routes when they input directions. Much like Google Maps, only in pictures. An example of this in use would be the application telling the user to turn left at the big maple tree instead of saying turn left from I-16 onto I-95. The application also has a fun and interesting feature which allows friends of the users to make routes and record them for the user with the built in camera and GPS system.

Pandora Pandora is a streaming radio station for the Internet age. We simply search by an artist or song and it will create a running playlist based on that one piece of information. It intersperses an occasional ad between songs but the ads tend to be fairly localized and occasionally even useful.

53

Shazam If you want to impress your friends with a mobile app, show them Shazam. Ever hear a song being played at a store or on the radio and ask ourself, Oh, what song is that? Thats where Shazam comes in. Just hit the button and let it listen for 15 seconds, query its database, and then return the name of artist and the song. It has about an 80% success rate.

54

Google Goggles This is a fun app that is a little but ahead of its time. It does visual searches. We can take pictures of things and then the app tries to tell you what they are. Its limited in its scope but it is pretty cool, and its definitely a peek into the future. One of the coolest features is the ability to take pictures of text in a foreign language and let that app translate for you. In a foreign country, this can help you read street signs and avoid going into the wrong bathroom.

Google Sky Map Ever look up at the night sky and try to tell your kids the name of that constellation youre pointing at, or try to remember which planet that is in the southern sky? Google SkyMap lets you point your smartphone at it and get the information. This is part of a new breed of apps called Augmented Reality

55

Security
Android is a multi-process system, in which each application (and parts of the system) runs in its own process. Most security between applications and the system is enforced at the process level through standard Linux facilities, such as user and group IDs that are assigned to applications. Additional finer-grained security features are provided through a "permission" mechanism that enforces restrictions on the specific operations that a particular process can perform, and per-URI permissions for granting ad-hoc access to specific pieces of data.

Advantages
There are a host of advantages that Googles Android will derive from being an open source software. Some of the advantages include: The ability for anyone to customize the Google Android platform

56

The consumer will benefit from having a wide range of mobile applications to choose from since the monopoly will be broken by Google Android . Men will be able to customize a mobile phones using Google Android platform like never before . Features like weather details, opening screen, live RSS feeds and even the icons on the opening screen will be able to be customized . As a result of many mobile phones carrying Google Android, companies will come up with such innovative products like the location In addition the entertainment functionalities will be taken a notch higher by Google Android being able to offer online real time multiplayer games

4.2

Android Database
Android provides several options for you to save persistent application data. The

solution you choose depends on your specific needs, such as whether the data should be private to your application or accessible to other applications (and the user) and how much space your data requires. Your data storage options are the following:

Shared Preferences
The SharedPreferences class provides a general framework that allows you to save and retrieve persistent key-value pairs of primitive data types. You can use SharedPreferences to save any primitive data: booleans, floats, ints, longs, and strings. This data will persist across user sessions (even if your application is killed) (Store private primitive data in key-value pairs.)

Internal File System Storage


57

You can save files directly on the device's internal storage. By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user). When the user uninstalls your application, these files are removed. (Store private data on the device memory).

External File System Storage


Every Android-compatible device supports a shared "external storage" that you can use to save files. This can be a removable storage media (such as an SD card) or an internal (non-removable) storage. Files saved to the external storage are world-readable and can be modified by the user when they enable USB mass storage to transfer files on a computer. External files can disappear if the user mounts the external storage on a computer or removes the media, and there's no security enforced upon files you save to the external storage. All applications can read and write files placed on the external storage and the user can remove them. (Store public data on the shared external storage).

SQLite Database
SQLiteDatabase has methods to create, delete, execute SQL commands, and perform other common database management tasks. SQLite is different from most other SQL database engines in that its primary design goal is to be simple:

Simple to administer Simple to operate Simple to embed in a larger program Simple to maintain and customize

Many people like SQLite because it is small and fast. But those qualities are just happy accidents. Users also find that SQLite is very reliable. Reliability is a consequence of simplicity. With less complication, there is less to go wrong. So, yes, SQLite is small, fast, and reliable, but first and foremost, SQLite strives to be simple. Android provides full
58

support for SQLite databases. Any databases you create will be accessible by name to any class in the application, but not outside the application. (Store structured data in a private database.) For our Virtual Network Computing we are using File system database,as all the details of all VNC CLIENTS are stored in this database like username, nickname, password, port no, address.

4.2 Overview Of JAVA


4.2.1 History
Java is a programming language created by James Gosling from Sun Microsystems in 1991. The first public available version of Java (Java 1.0) was released in 1995. Over time several version of Java were release which improved and enhanced the language and it libraries. The current version of Java is Java 1.6 also known as Java 6.0.

4.2.2 Introduction To Java


Computers connected to the net are from many different manufacturers, running on different operating systems and they differ in architecture, computing power and capacity. By considering this point SUN Microsystems Corporation felt the need for a new programming language suitable for this heterogeneous Environment and java was the solution. This breaks barriers between different computers, chips and operating Systems. .

59

The Java programming language consists out of a Java compiler, the Java virtual machine, and the Java class libraries. The Java virtual machine (JVM) is a software implementation of a computer that executes programs like a real machine. The Java compiler translates Java coding into so-called byte-code. The Java virtual machine interprets this byte-code and runs the program. The Java virtual machine is written specifically for a specific operating system. The Java runtime environment (JRE) consists of the JVM and the Java class libraries.

4.2.3 What is Java?


A very portable object-oriented programming language. A large supporting class library that covers many general needs. Can creates Applets, Applications, Servlets, JavaServer Pages, and more. An open standard - the language specification is publicly available. JVM - Java Virtual Machine.

4.2.4 Why do I need Java In Android?


There are lots of applications and websites that won't work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere . Android applications are developed using the Java language. As of now, thats really your only option for native applications. Java is a very popular programming language developed by Sun Microsystems (now owned by Oracle). Developed long after C and C++, Java incorporates many of the powerful features of those powerful languages while addressing some of their drawbacks. Still, programming languages are only as powerful as their libraries. These libraries exist to help developers build applications.

60

Some of the Javas important core features are:


Its easy to learn and understand Its designed to be platform-independent and secure, using virtual machines Its object-oriented Android relies heavily on these Java fundamentals. The Android SDK includes many

standard Java libraries (data structure libraries, math libraries, graphics libraries, networking libraries and everything else you could want) as well as special Android libraries that will help us develop android applications. Android applications run in a special virtual machine called the Dalvik VM. While the details of this VM are unimportant to the average developer, it can be helpful to think of the Dalvik VM as a bubble in which our Android application runs, allowing us to not have to worry about whether the device is a Motorola Droid, an HTC Evo, or the latest toaster running Android applications.

Java Versus Dalvik


In Java, we write Java source file, compile it into a Java byte code using Java compiler and run this byte code on the Java Virtual Machine. In Android things are different. We still write the Java source file and still compile it to Java byte code using the same Java compiler. But at that point, we recompile it once again using Dalvik compiler to Dalvik byte code. It is Dalvik byte code that is then executed on Dalvik virtual machine

61

4.2.5 Features of Java


The main properties of the Java, which made Java so popular, are as follows: Simple Secure Portable Object-Oriented Robust Multithreaded Interpreted

The Key Features Of Java Is Byte Code:


62

The key that allows Java to solve both the security and the portability problems just described is that the output of a Java compiler is not executable code. Rather, it is Byte code. Byte code is a highly optimized set of instructions designed to be executed by the Java runtime systems, which is called the Java Virtual Machine (JVM). That is, in its

standard form, the JVM is an interpreter for Byte code. Java Platform: One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any supported hardware/operating-system platform. One should be able to write a program once, compile it once, and run it anywhere. This is achieved by compiling the Java language code, not to machine code but to Java bytecode instructions analogous to machine code but intended to be interpreted by a virtual machine (VM) written specifically for the host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications, or in a Web browser for Java applets. A major benefit of using byte code is porting. However, the overhead of interpretation means that interpreted programs almost always run more slowly than programs compiled to native executables would, and Java suffered a reputation for poor performance. This gap has been narrowed by a number of optimisation techniques introduced in the more recent JVM implementations. One such technique, known as just-in-time (JIT) compilation, translates Java bytecode into native code the first time that code is executed, then caches it. This result in a program that starts and executes faster than pure interpreted code can, at the cost of introducing occasional compilation overhead during execution. More sophisticated VMs also use dynamic recompilation, in which the VM analyzes the behavior of the running program and selectively recompiles and optimizes parts of the program.

63

Dynamic recompilation can achieve optimizations superior to static compilation because the dynamic compiler can base optimizations on knowledge about the runtime environment and the set of loaded classes, and can identify hot spots - parts of the program, often inner loops, that take up the most execution time. JIT compilation and dynamic recompilation allow Java programs to approach the speed of native code without losing portability.

The target of Java is to write a program once and then run this program on multiple operating systems. Platform Independent

The concept of Write-once-run-anywhere (known as the Platform independent) is one of the important key feature of java language that makes java as the most powerful language. Not even a single language is idle to this feature but java is more closer to this feature. The programs written on one platform can run on any platform provided the platform must have the JVM. Simple

There are various features that makes the java as a simple language. Programs are easy to write and debug because java does not use the pointers explicitly. It is much harder to write the java programs that can crash the system but we can not say about the other programming languages. Java provides the bug free system due to the strong memory management. It also has the automatic memory allocation and deallocation system.

Robust

Java has the strong memory allocation and automatic garbage collection mechanism. It provides the powerful exception handling and type checking mechanism as compare to
64

other programming languages. Compiler checks the program whether there any error and interpreter checks any run time error and makes the system secure from crash. All of the above features makes the java language robust.

Distributed

The widely used protocols like HTTP and FTP are developed in java. Internet programmers can call functions on these protocols and can get access the files from any remote machine on the internet rather than writing codes on their local system.

Portable

The feature Write-once-run-anywhere makes the java language portable provided that the system must have interpreter for the JVM. Java also have the standard data size irrespective of operating system or the processor. These features makes the java as a portable language.

Dynamic

While executing the java program the user can get the required files dynamically from a local drive or from a computer thousands of miles away from the user just by connecting with the Internet. Secure

65

Java does not use memory pointers explicitly. All the programs in java are run under an area known as the sand box. Security manager determines the accessibility options of a class like reading and writing a file to the local disk. Java uses the public key encryption system to allow the java applications to transmit over the internet in the secure encrypted form. The bytecode Verifier checks the classes after loading.

Multithreaded

Java is also a Multithreaded programming language. Multithreading means a single program having different threads executing independently at the same time. Multiple threads execute instructions according to the program code in a process or a program. Multithreading works the similar way as multiple processes run on one computer. Multithreading programming is a very interesting concept in Java. In multithreaded programs not even a single thread disturbs the execution of other thread. Threads are obtained from the pool of available ready to run threads and they run on the system CPUs. Interpreted And Compiled Language Java source code is transfered into byte-code which does not depend on the target platform. This byte-code will be interpreted by the Java Virtual machine (JVM). The JVM contains a so called Hotspot-Compiler which translates critical byte-code into native code. Automatic Memory Management Java manages the memory allocation and de-allocation for creating new objects. The program does not have direct access to the memory. The so-called garbage collector deletes automatically object to which no active pointer exists.

66

Java And Modularity Application Java supports the partition of a large program into modules.

Specifically, a Java program consists of number of classes. If the program is properly designed, these classes will reflect encapsulation and information hiding. In Java, grouping sets of related classes into packages. Could enhance encapsulation and information hiding.

Java And Structured Programming Java supports the three control structures of structured programming. Unlike c and c+ +, there is no go statement in Java. There is essentially no need for a go because Java supports the labeled break and continue statements. Java And Object Orientation Java supports the five basic elements of Object-Oriented language, namely, classes, objects, inheritance, polymorphism, and dynamic binding. Java is a pure Object-Oriented language, it does not support the classical paradigm. Thus there are no functions or procedures, only methods or classes. Java And Visibility In Java, however, there are five types of access and the rules are more convoluted than in C++ because Java classes can be grouped into package of related classes, the simplest Visibility modifier is public, then it can be accessed from any where within the product. A protected attribute can be accessed by immediate derived classes. Private attribute cannot be accessed outside the class. The Java syntax is similar to C++. Java is case sensitive, e.g. the variables myValue and myvalue will be treated as different variables.

67

Object Oriented Programming Principles


To be an Object Oriented language, any language must follow at least the four characteristics. Inheritance It is the process of creating the new classes and using the behavior of the existing classes by extending them just to reuse the existing code and adding the additional features as needed. Inheritance allows that classes can be based on each other. If a class A inherits another class B this is called "class A extends class B". For example you can define a base class which provides certain logging functionality and this class is extended by another class which adds email notification to the functionality Encapsulation It is the mechanism of combining the information and providing the abstraction. A general manipulation of an object's variables by other objects or classes is discouraged to ensure data encapsulation. A class should provide methods through which other objects could access variables. Java deletes objects which are not longer used (garbage collection). Abstraction Java support the abstraction of data definition and concrete usage of this definition. The concept is divided from the concrete which means you first define a class containing the variables and the behavior (methods) and afterwards you create the real objects which then all behave like the class defined it. A class is the definition of the behavior and data. A class can not be directly be used. A object in an instance of this class and is the real object which can be worked with.

68

Polymorphism As the name suggest one name multiple form, Polymorphism is the way of providing the different functionality by the functions having the same name based on the signatures of the methods..

Why is Java Secure?


Because Java applications run within the bubble that is a virtual machine, they are isolated from the underlying device hardware. Therefore, a virtual machine can encapsulate, contain, and manage code execution in a safe manner compared to languages that operate in machine code directly. The Android platform takes things a step further. Each Android application runs on the (Linux-based) operating system using a different user account and in its own instance of the Dalvik VM. Android applications are closely monitored by the operating system and shut down if they dont play nice (e.g. use too much processing power, become unresponsive, waste resources, etc.). Therefore, its important to develop applications that are stable and responsive. Applications can communicate with one another using welldefined protocols.

4.2.6 Compilation Of Android Code


Like many languages, Java is still a compiled language even though it doesnt compile all the way down to machine code. This means you, the developer, need to compile your Android projects and package them up to deploy onto devices. The Eclipse development environment (used with the Android Development plug-in) makes this pretty painless. In Eclipse, automatic compilation is often turned on by default. This means that every time you save a project file, Eclipse recompiles the changes for your application package. You immediately see compile errors. Eclipse also interprets Java as you type, providing handy code coloring and formatting as well as showing many types of errors as you go. Often, you can click on the error and have Eclipse automatically fix a typo, or add an import statement, or provide a method stub for you, saving lots of typing.

69

You can still manually compile your code if you so desire. Within Eclipse, youll find the Build settings under the project menu. If you have Build Automatically turned on, you can still choose the Clean option that will allow you to do full rebuild of all files. If Build Automatically is turned off, Build All and Build Project menu options are enabled. Build All means to build all of the projects in the workspace. You can have many projects in an Eclipse workspace. The build process, for regular Java projects, results in a file with the extension of JAR Java ARchive. Android applications take JAR files and package them for deployment on devices as Android PacKage files with an extension .apk. These formats not only include your compiled Java code, but also any other resources, such as strings, images, or sound files, that your application requires to run as well as the Application Manifest file, AndroidManifest.xml. The Android Manifest file is a file required by all Android applications, which you use to define configuration details about your app.

4.2.7 Development with Java


The programmer writes java source code which can be done in any text editor which supports plain text as output. Normally the programmer uses an IDE (integrated development environment) for programming. An IDE support usually the programmer in his tasks, e.g. it provides auto-formatting of the source code, highlighting of the important keywords, etc. At some point the programmer (or the IDE) calls the java compiler. The java compiler creates platform independent code which is called bytecode. Bytecode can be executed by the java runtime environment. The java runtime environment (JRE) is a program which knows how to run the bytecode on the operating system. The JRE translates the bytecode into native code, e.g. the native code for Linux is different then the native code for Windows and executes it. The classpath is the connection between the Java compiler and Java interpreter. It defines where the compiler and interpreter look for .class files to load.

70

By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with d

JDK Editions
Java Standard Edition (J2SE) J2SE can be used to develop client-side standalone applications or applets. Java Enterprise Edition (J2EE) J2EE can be used to develop server-side applications such as Java Servlets and Java Server Pages. Java Micro Edition (J2ME) J2ME can be used to develop applications for mobile devices such as cell phones.

5.SYSTEM DESIGN
71

5.1 An overview of the UML


What is UML?

The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems, as well as for business modeling and other non-software systems. The UML represents a collection of best engineering practices that have proven successful in the modeling of large and complex systems. The UML is a very important part of developing objects oriented software and the software development process. The UML uses mostly graphical notations to express the design of software projects. Using the UML helps project teams communicate. Explore potential designs, and validate the architectural design of the software. The UML is a language for Visualizing Specifying

Constructing

Documenting The artifacts of a software-intensive system. Modeling yields an understanding of a system. No one model is ever sufficient rather; you often need multiple models that are connected to one another in order to understand anything but the most trivial system.

Why Use UML?

72

As the strategic value of software increases for many companies, the industry looks for techniques to automate the production of software and to improve quality and reduce cost and time-to market. These techniques include component technology, visual programming, patterns and frameworks. Businesses also seek techniques to manage the complexity of systems as they increase in scope and scale. In particular, they recognize the need to solve recurring architectural problems, such as physical distribution, concurrency, replication, security, load balancing and fault tolerance. The Unified Modeling Language (UML) was designed to respond to these needs.

5.2 Building Blocks of the UML


The vocabulary of the UML encompasses three kinds of building blocks: 1. Things 2. Relationships 3. Diagrams

Things
Are the abstractions that are first-class citizens in a model.

Relationships
Relationships tie these things together.

Diagrams
Diagrams group interesting collections of things.

Things in the UML:

73

There are four kinds of things in the UML: 1. Structural things 2. Behavioral things 3. Grouping things 4. Annotational things These things are the basic object-oriented building blocks of the UML. You use them to write well-formed models. Structural Things Structural things are the nouns of UML model. These are the mostly static parts of a model, representing elements that are either conceptual or physical. In all, there are seven kinds of structural things. 1. CLASS A description of a set of objects that share the same attributes operations, relationships, and semantics. A class implements one or more interfaces. Graphically, a class is rendered as a rectangle, usually including its name, attributes, and operations.

2. INTERFACE
74

A collection of operations that specify a service (for a resource or an action) of a class or component. It describes the externally visible behavior of that element. Graphically, an interface is rendered as a circle together with its name.

ISpelling 3. COLLABORATION Define an interaction among two or more classes. Define a society of roles and other elements. Provide cooperative behavior. Capture structural and behavioral dimensions.Graphically, collaboration is rendered as an ellipse with dashed lines, usually including only its name.
Chain of Responsibility

Collaboration . 4. USE CASE A sequence of actions that produce an observable result for a specific actor .A set of scenarios tied together by a common user goal .Provides a structure for behavioral things. Graphically, a use case is rendered as an ellipse with solid lines, usually including only its name.

Place Order

Use Cases

5. ACTIVE CLASS

75

Special class whose objects own one or more processes or threads and therefore can initiate control activity. An active class is just like a class except that its objects represent elements whose behavior is concurrent with other elements. Graphically, an active class is rendered just like a class, but with heavy lines, usually included its name, attributes, and operations.

Active Class 6. COMPONENT A component is a physical and replaceable part of a system. Components can be packaged logically. Conforms to a set of interfaces. Provides the realization of an interface. Represents a physical module of code. Graphically, a component is rendered as a rectangle with tabs, usually including only its name.

Components 7. NODE Node is a physical element that exists at run time and represents a computational resource. Generally has memory and processing power. A set of components may reside on a node and may also migrate from node to node. Graphically a node is rendered as a cube, usually including only its name.

Node Behavioral Things

76

Behavioral Things are the verbs of UML models. These are the dynamic parts of UML models: behavior over time and space Usually connected to structural things in UML. Two primary kinds of behavioral things 1.INTERACTION Interaction is a behavior of a set of objects comprising of a set of message exchanges within a particular context to accomplish a specific purpose. An interaction involves a number of other elements including messages, action sequences, and links. Graphically a message is rendered as a directed line, almost always including the name of its operation.

2. STATE MACHINE Behavior that specifies the sequences of states an object or an interaction goes through during its lifetime in response to events, together with its responses to those events. Graphically, a state is rendered as a rounded rectangle, usually including its name and its sub states.

Waiting
State Machine

Grouping Things Grouping things are the organizational parts of the uml model.

77

1. PACKAGES One primary kind of grouping. General purpose mechanism for organizing elements into groups. Contains behavioral and structural things. Can be nested.

Business rules
Packages

Annotational Things Annotational things are the explanatory parts of UML models. Comments regarding other UML elements (usually called adornments in UML) NOTE Is the one primary annotational thing in UML best expressed in informal or formal text. A note is simply a symbol for rendering constraints and comments attached to an element or a collection of elements. Graphically a note is rendered as a rectangle with a dogeared corner, together with a textual or graphical comment.

Return copy
Node Of self

2.Relationships in the UML:

There are four kinds of relationships in the UML: 1. Dependency


78

2. Association 3. Generalization 4. Realization

1. DEPENDENCY A semantic relationship between two things in which a change to one thing (independent) may affect the semantics of the other thing (dependent). Graphically, a dependency is rendered as a dashed line, possibly directed, and occasionally including a label.

2. ASSOCIATION

An association is a structural relationship that describes a set of 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. Graphically, an association is rendered as a solid line, possibly directed, occasionally including a label, and often containing other adornments.
0.1 *

Employer

Employee

3. GENERALIZATION A specialization/generalization relationship in which objects of the specialized element (the child) are more specific than the objects of the generalized element. Graphically, a generalization relationship is rendered as a solid line with a hollow arrowhead pointing to the parent.
79

4. REALIZATION A semantic relationship between two elements, wherein one element guarantees to carry out what is expected by the other element. Graphically, a realization is rendered as a cross between a generalization and a dependency relationship.

3.Diagrams in the UML

A diagram is the graphical presentation of a set of elements, most often rendered as a connected graph of vertices (things) and arcs (relationships). The UML includes nine diagrams: 1. Use case diagram 2. Class diagram 3. Object diagram 4. Sequence diagram 5. Collaboration diagram 6. State chart diagram 7. Activity diagram 8. Component diagram 9. Deployment diagram

A Use Case Diagram


Shows a set of use cases and actors (a special kind of class) and their relationships. Use case diagrams address the static use case view of a system. These diagrams are especially important in organizing and modeling the behaviors of a system.

80

A Class Diagram
Shows a set of classes, interfaces, and collaborations and their relationships. These diagrams are the most common diagram found in modeling object-oriented systems. Class diagrams address the static design view of a system. Class diagrams that include active classes address the static process view of a system

An Object Diagram
Shows set of objects and their relationships. Object diagrams represent static snapshots of instances of the things found in class diagrams. These diagrams address the static design view or static process view of a system as do class diagrams, but from the perspective of real or prototypical cases.

Sequence Diagram&Collabration Diagram


Both sequence and collaboration diagrams are kind of interaction diagrams. An interaction diagram shows an interaction, consisting of a set of objects and their relationships, including the message that may be dispatched among them. Interaction diagram address the dynamic view of the system. A sequence diagram is an interaction diagram that emphasizes the time-ordering of messages; a collaboration diagram is an interaction diagram that emphasizes the structural organization of the objects that send and receive messages.

A State Chart Diagram


Shows a state machine, consisting of states, transitions, events, and activities. State chart diagrams address the dynamic view of the system. They are especially important in modeling the behavior of an interface, class, or collaboration and emphasize the eventordered behavior of an object, which is especially useful in modeling reactive systems.

An Activity Diagram

81

Is a special kind of a state chart diagram that shows the flow from activity to activity within a system. Activity diagrams address the dynamic view of a system. They are especially important in modeling the function of a system and emphasize the flow of control among objects.

A Component Diagram
Shows the organizations and dependencies among a set of components. Component diagram address the static implementation view of a system. They are related to class diagrams in that a component typically maps to one or more classes, interfaces, or collaborations.

A Deployment Diagram

Shows the configuration of run-time processing nodes and the components that live on them. Deployment diagrams address the static deployment view of architecture. They are related to component diagrams in that a node is typically encloses one or more components.

5.3 Uml Diagrams


.

A Use Case Diagram

82

A use case diagram shows a set of use cases and actors (a special kind of class) and their relationships. Use case diagrams address the static use case view of a system. These diagrams are especially important in organizing and modeling the behaviors of a system.Use case diagrams model the functionality of a system using actors and use cases. Use cases are services or functions provided by the system to its users. Basic Use Case Diagram Symbols and Notations System

Draw your system's boundaries using a rectangle that contains use cases. Place actors outside the system's boundaries.

Use Case Draw use cases using ovals. Label with ovals with verbs that represent the system's functions.
83

Actors Actors are the users of a system. When one system is the actor of another system, label the actor system with the actor stereotype.

Relationships

Illustrate relationships between an actor and a use case with a simple line. For relationships among use cases, use arrows labeled either "uses" or "extends." A "uses" relationship indicates that one use case is needed by another in order to perform a task. An "extends" relationship indicates alternative options under a certain use case.

USE CASE DIAGRAMS

84

LAN/WAN CONNECTION

INSTALLING VNC SERVER

REMOTE SYSTEM (VNC SERVER) START APPLICATION

VNC CLIENT

AUTHENTICATION

ACCESSING SYSTEM DATABASE (FILE SYSTEM) LOG OUT

A Class Diagram

85

A class diagram shows a set of classes, interfaces, and collaborations and their relationships. These diagrams are the most common diagram found in modeling objectoriented systems. Class diagrams address the static design view of a system. Class diagrams that include active classes address the static process view of a system.

Basic Class Diagram Symbols and Notations

Classes represent an abstraction of entities with common characteristics. Associations represent the relationships between classes. Classes Illustrate classes with rectangles divided into compartments. Place the name of the class in the first partition (centered, bolded, and capitalized), list the attributes in the second partition, and write operations into the third.

Active Class Active classes initiate and control the flow of activity, while passive classes store data and serve other classes. Illustrate active classes with a thicker border.

Associations

Associations represent static relationships between classes. Place association names


86

above, on, or below the association line. Use a filled arrow to indicate the direction of the relationship. Place roles near the end of an association. Roles represent the way the two classes see each other.

More Basic Class Diagram Symbols and Notations Multiplicity (Cardinality) Place multiplicity notations near the ends of an association. These symbols indicate the number of instances of one class linked to one instance of the other class. For example, one company will have one or more employees, but each employee works for one company only.

Constraint

Place constraints inside curly braces {}.

87

Simple Constraint

Composition and Aggregation Composition is a special type of aggregation that denotes a strong ownership between Class A, the whole, and Class B, its part. Illustrate composition with a filled diamond. Use a hollow diamond to represent a simple aggregation relationship, in which the "whole" class plays a more important role than the "part" class, but the two classes are not dependent on each other. The diamond end in both a composition and aggregation relationship points toward the "whole" class or the aggregate.

88

Generalization

Generalization is another name for inheritance or an "is a" relationship. It refers to a relationship between two classes where one class is a specialized version of another. For example, Honda is a type of car. So the class Honda would have a generalization relationship with the class

CLASS DIAGRAM

89

SEQUENCE DIAGRAM

90

A sequence diagram emphasizes the time ordering of messages. We form a sequence diagram by first placing the objects that participate in the interaction at the top of the diagram across the x-axis. Messages send and receive along the y-axis

Class roles describe the way an object will behave in context. Use the UML object symbol to illustrate class roles, but dont list object attributes.

object:cla ss

Sequence diagram have two features that distinguish them from collaboration diagrams.

First there is the object lifeline. An object lifeline is the vertical dashed line that represents the existence of an object over a period of time. Their lifeline start with the receipt of message stereotyped as create. An object may be destroyed during the interaction and their lifeline end with the receipt of the message stereotyped as destroy.
91

Second, there is the focus of control. The focus of control is a tall, thin rectangle that shows the period of time during which an object is performing an action either directly or through a subordinate procedure. The top of the rectangle is aligned with the start of the action; the bottom is aligned with its completion.

SEQUENCE DIAGRAM

92

4. ACTIVITY DIAGRAM

93

An activity diagram is a special kind of state chart diagram that shows the flow from activity to activity within a system.Activity diagrams address the dynamic view of a system.they are especially important in modelling the function of a system and emphasize the flow of control among objects.Graphically,an activity diagram is a collection of vertices and arcs.

An activity is an ongoing non atomic execution within a state machine.Activities ultimately result in an action,which is made up of executable atomic computations that result in a change in state of the system or the return value.Actions encompass calling another operation,sending a signal,creating or destroying an object or some pure computation,such as evaluating an expression. Activity diagrams commonly contains Activity states and Action states Transitions Objects Activity States And Action States

In a flow of control modeled by an activity diagram,things happen.We might evaluate some expression that sets the value of an attribute or that returns some value of an attribute or that returns some value.Alternately,we might call an operation on an object,send a signal to an object or even create or destroy an object.These executable,atomic computations are called action states because they are the states of the system,each representing the execution of an action. Action states cannot be decomposed.Further more ,action sates are atomic,meaning that events may occur,but the work of the action state is not interrupted.Finally,the work of an action state is generally considered to take insignificant execution time.

94

Simple name Bid plan

Action state

Expression

Index:=lookup(e)+7:

Fig :action state Activity states can be further decomposed,their activity being represented by other activity diagrams. Further more, activity states are non atomic, meaning that may be interrupted and, in general, are considered to take some duration to complete. An action state is a activity state that cannot be further decomposed. Similarly, we can think of an activty as a compostie, whose flow of control is made up of other activity states and action states.

TRANSITIONS

A transition is a relationship between two states indicating that an object in the first state will perform certain actions and enter the second state when a specified event occurs and specified conditions are satisfied.Graphically,a transition is rendered as a solid directed line from the source to the target state. A self transition is a transition whose source and the target states are the same.

OBJECT
95

An object is a concrete manifestation of an abstraction to which a set of operations can be applied and which has a state that stores the effects of the operations.Graphically an object is rendered by underlining its name as follows:
Object name:class

96

ACTIVITY DIAGRAM

97

6.SCREENS
VNC SERVER INSTALLATION

98

VNC PROPERTIES
99

BOOTING OF THE EMULATOR

100

Starting VNC Application

101

PROVIDING THE OPTIONS

102

CONNECTING TO REMOTE SYSTEM

103

Showing Remote Desktop On Emulator

FEATURES
104

SENDING THE KEYS

SENDING TEXT
105

VIEWING VEDIO OF REMOTE SYSTEM ON EMULATOR


106

7.SOFTWARE TESTING
107

7.1 What is testing?


A process of executing a program with the explicit intention of finding errors, that is making the program fail. Testing is the process of detecting errors. Testing performs a very critical role for quality assurance and for ensuring the reliability of software.

Psychology of Testing
The aim of testing is often to demonstrate that a program works by showing that it has no errors. The basic purpose of testing phase is to detect the errors that may be present in the program. Hence one should not start testing it the intent of showing that a program works but the intent should be to show that a program does not work. Testing is the process of executing a program with the intent of finding errors.

7.2 Testing Objectives


The main objective of testing is to uncover a host of errors, systematically and with minimum effort and time. Stating formally, we can say, Testing is a process of executing a program with the intent of finding an error. A successful test is one that uncovers an as yet discovered error. A good test case is one that has a high probability of finding error, if it exists. The tests are inadequate to detect possibly present errors.

7.3 Black Box Testing


Black box testing is based on the softwares specifications or requirements, without reference to its internal workings Black Box Testing is not a type of testing; it instead is a testing strategy, which does not need any knowledge of internal design or code etc. As the name "black box" suggests, no knowledge of internal logic or code structure is required. The types of testing under this strategy are totally based/focused on the testing for requirements and functionality of the work product/software application.
108

Black box testing is sometimes also called as "Opaque Testing", "Functional/Behavioral Testing"and"ClosedBoxTesting". In order to implement Black Box Testing Strategy, the tester is needed to be thorough with the requirement specifications of the system and as a user, should know, how the system should behave in response to the particular action.

7.4 White Box Testing:


White box testing is a security testing method that can be used to validate whether code implementation follows intended design, to validate implemented security functionality, and to uncover exploitable vulnerabilities White box testing is performed based on the knowledge of how the system is implemented. White box testing includes analyzing data flow, control flow, information flow, coding practices, and exception and error handling within the system, to test the intended and unintended software behavior.. White box testing requires access to the source code. Though white box testing can be performed any time in the life cycle after the code is developed, it is a good practice to perform white box testing during the unit testing phase. Knowing the internal working i.e., to test if all internal operations are performed according to program structures and data structures. To test if all internals components have been adequately exercised.

7.5 Levels of Testing:


In order to uncover the errors present in different phases we have the concept of levels of testing. The basic levels of testing are Client needs Requirements Design Acceptance Testing System Testing Integration Testing

109

Code

Unit Testing

Software Testing Strategies:


It is the process of testing the functionality and correctness of a software by running it. A good test case is the one that has a high probability of finding an as yet undiscovered error. A strategy for software testing will begin in the following order. Unit Testing Integration Testing Validation Testing System Testing

Unit Testing:
It concentrates on each unit of the software as implemented in source code and is a white box oriented. Using the component level design description as a guide, important control paths are tested to uncover errors with in the boundary of the module. In the unit testing, the steps can be conducted in parallel for multiple components. In my project I tested all the modules individually related to main function codes and attacks also.

Integration Testing:
Here focus is on design and construction of the software architecture. Integration Testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing. The objective is to take unit tested components and build a program structure that has been dictated by design. The goal here is to see if modules can be integrated properly, the emphasis being on testing interfaces between modules. In this project the main system is formed by integrating all the modules. When integrating all the modules I have checked whether the integration effects working of any of

110

the services by giving different combinations of inputs with which the two services run perfectly before integration.

Validation Testing:
In this, requirements established as part of software requirement analysis are validated against the software that has been constructed i.e., validation succeeds when software functions in a manner that can reasonably expected by the customer.

System Testing:
System testing of software or hardware is testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. System testing falls within the scope of black box testing, and as such, should require no knowledge of the inner design of the code or logic. Here the entire software system is tested. The reference document for this process is the requirements document, and the goal is to see if software meets its requirements.

7.6 TEST CASES


A test case in software engineering is a set of conditions or variables under which a tester will determine whether an application or software system meets specifications. The mechanism for determining whether a software program or system has passed or failed such a test is known as a test oracle. In some settings an oracle could be a requirement or use case. It may take many test cases to determine that a software program or system is functioning correctly.

What are positive and negative test cases?


A positive test case is when the test is designed to return what is expected according to the requirement. Negative test case is when the test is designed to determine the response of the product outside of what is defined.

111

8. CONCLUSION

VNC is a very impressive product, especially considering that it's free. Its main advantage over its commercial competitors is that it is open source, so anyone with programming skills can contribute towards it and so make it an even better, more flexible product. A Virtual Network Computing, or VNC, is an open-source, cross-platform software product which enables viewing and controlling GUI desktops on remote machines on a network, either within a LAN or over a WAN/Internet connection. Android is open to all: industry, developers and users

112

9.FUTURE ENHANCEMENTS

The future scope of our project is to access one mobile through the other mobile by using vnv server and client application. Google Android Sales to Overtake iPhone in 2012 The OHA is committed to make their vision a reality: to deploy the Android platform for every mobile operator, handset manufacturers and developers to build innovative devices Fujitsu launched an initiative to offer consulting and engineering expertise to help run Android on embedded hardware, which aside from cellphones, mobile internet devices, and portable media players, could include GPS devices, thin-client computers and set-top boxes.

113

10.BIBILIOGRAPHY

Books Referred:
Professional android application development wrox publications Android SDK rc15 Android Programmers Guide --- McGrawHilI

Website Browsed:
http://google.com/ http://android-developers.blogspot.com/ http://androidcommunity.com/ http://www.android.com/ htt http://en.wikipedia.org/wiki/Tetrisp://code.google.com/android/

114

Vous aimerez peut-être aussi