android bluetooth chat

28
Chapter 1: Project Outline 1.1. Background With the development of digital technologies in recent decades, there has been drastic change in the mode of communication and usages of digital accessories in our day to day lives. It is sure that invention of mobile phone/smart phone has enhanced our life standard and made life easier. A smart phone is a mobile phone built on a mobile operating system, with more advanced computing capability and connectivity than a feature phone. The first smart phones combined the functions of a personal digital assistant (PDA) with a mobile phone. Later models added the functionality of portable media players, low- end compact digital cameras, pocket video cameras, Bluetooth and GPS navigation units to form one multi-use device. Many modern smart phones also include high- resolution touch screens and web browsers that display standard web pages as well as mobile-optimized sites. High-speed data access is provided by Wi-Fi and mobile broadband. In recent years, the rapid developments of mobile app markets and of mobile commerce have been drivers of Smartphone adoption. A mobile application (or mobile app) is a software application designed to run on Smartphone, tablet 1 | Page

Upload: niraj-dahal

Post on 30-Nov-2015

1.360 views

Category:

Documents


5 download

DESCRIPTION

proposal report on android bluetooth chat application

TRANSCRIPT

Page 1: android bluetooth chat

Chapter 1: Project Outline

1.1. Background

With the development of digital technologies in recent decades, there has been drastic

change in the mode of communication and usages of digital accessories in our day to

day lives. It is sure that invention of mobile phone/smart phone has enhanced our life

standard and made life easier. A smart phone is a mobile phone built on a mobile

operating system, with more advanced computing capability and connectivity than a

feature phone. The first smart phones combined the functions of a personal digital

assistant (PDA) with a mobile phone. Later models added the functionality of

portable media players, low-end compact digital cameras, pocket video cameras,

Bluetooth and GPS navigation units to form one multi-use device. Many modern

smart phones also include high-resolution touch screens and web browsers that

display standard web pages as well as mobile-optimized sites. High-speed data access

is provided by Wi-Fi and mobile broadband. In recent years, the rapid developments

of mobile app markets and of mobile commerce have been drivers of Smartphone

adoption.

A mobile application (or mobile app) is a software application designed to run on

Smartphone, tablet computers and other mobile devices. They are usually available

through application distribution platforms, which are typically operated by the owner

of the mobile operating system, such as the Apple App Store, Google Play, Windows

Phone Store and BlackBerry App World. The term "app" has become popular, and in

2010 was listed as "Word of the Year" by the American Dialect Society. In 2009,

technology columnist David Pogue said that newer smart phones could be nicknamed

"app phones" to distinguish them from earlier less-sophisticated smart phones.

Mobile apps were originally offered for general productivity and information

retrieval, including email, calendar, contacts, and stock market and weather

information. However, public demand and the availability of developer tools drove

rapid expansion into other categories, such as mobile games, factory automation, GPS

1 | P a g e

Page 2: android bluetooth chat

and location-based services, banking, order-tracking, and ticket purchases. The

popularity of mobile applications has continued to rise, as their usage has become

increasingly prevalent across mobile phone users. A May 2012 comScore study

reported that during the previous quarter, more mobile subscribers used apps than

browsed the web on their devices: 51.1% vs. 49.8% respectively.

Fig 1: Graph showing use of android phone

Android is a Linux-based operating system designed primarily for touch screen

mobile devices such as smart phones and tablet computers. Initially developed by

Android, Inc, which Google backed financially and later bought in 2005, Android

was unveiled in 2007 along with the founding of the Open Handset Alliance: a

consortium of hardware, software, and telecommunication companies devoted to

advancing open standards for mobile devices. The first Android-powered phone was

sold in October 2008.

2 | P a g e

Page 3: android bluetooth chat

1.2. Introduction

Ultra Communicator for android mobile OS (UC-roid) is a mobile application which

is designed to work on android operating system. This application is used for

accessing the data of other mobile or any other devices (e. g laptop, PC) which has

support to Bluetooth connectivity. Since the craze of mobile phones especially smart

phones is growing eagerly every year, in the same ratio the development of mobile

application to support those phones is also growing. The basic idea of the application

is to establish the connection between mobiles and have a full access to the data e.g.

files, e-books, images, documents, music files etc. Once connected, you can explore

all your Android videos, photos, and music on the laptop wirelessly.

Fig 2: PC explorer

Fig 3: Bluetooth chat

3 | P a g e

Bluetooth/Wi-Fi

Bluetooth

Page 4: android bluetooth chat

The additional function of the application is to provide communication i.e. chat

(text/voice) between the connected devices. With the help of application one can view

as well as play the media file in his device.

Working Principle:

The application is installed in phone and it ask request for connection to other phones,

in case of pc or laptops their operating system have default service to connect those

devices. Any Bluetooth device in discoverable mode will transmit the following

information on demand:

• Device name

• Device class

• List of services

• Technical information (for example: device features, manufacturer, Bluetooth specification used, clock offset)

Any device may perform an inquiry to find other devices to connect to, and any

device can be configured to respond to such inquiries. However, if the device trying

to connect knows the address of the device, it always responds to direct connection

requests and transmits the information shown in the list above if requested. Use of a

device's services may require pairing or acceptance by its owner, but the connection

itself can be initiated by any device and held until it goes out of range. Some devices

can be connected to only one device at a time, and connecting to them prevents them

from connecting to other devices and appearing in inquiries until they disconnect

from the other device.

Every device has a unique 48-bit address. However, these addresses are generally not

shown in inquiries. Instead, friendly Bluetooth names are used, which can be set by

the user. This name appears when another user scans for devices and in lists of paired

devices.

4 | P a g e

Page 5: android bluetooth chat

1.3. Objectives

i. To utilize the strong Bluetooth connectivity power of android smart phones

ii. To access data like images, documents, media files, e-books etc without

being transferred from one phone to other phone.

iii. To establish the connection between android phones and PC/laptops and

facilitate communication via text/voice i.e. chat.

iv. To communicate between two outrange device with one intermediate host

v. To capture wifi network and spread hotspot.

1.4. Features

Ultra Communicator is android application designed to run on smart phones, which

supports most of the features related in the field of communication. The main

remarkable features are:-

o Bluetooth chat

(Text/voice chat)

o File sharing

File transfer and access authority

(Eg.pdf documents, jpeg, word, e-book etc)

o Spread hotspot

(Captures wifi and spread virtual network)

o Outrange communication with the aid of intermediate host

(It helps to extend the range of Bluetooth)

o User friendly interface

Fully secured (It asks user authority to access the files)

5 | P a g e

Page 6: android bluetooth chat

Chapter 2: Literature Review

2.1. Literature Review

The mobile applications market is currently undergoing rapid expansion, as mobile

platforms continue to improve in performance, and as the users’ need for a wide

variety of mobile applications increases. The latest mobile platforms allow for

extensive utilization of network resources, and thus offer a strong alternative to

workstations and associated software.

Android is a mobile operating system that is based on a modified version of Linux. It

was originally developed by a start of the same name, android, Inc. Google wanted

android to be open and free; hence, most of the android code can do so by

downloading the full android source code. The main advantage of adopting android is

that it offers a unified approach to application development. Android application is

developed in android software development kit (SDK). It contains a debugger,

libraries, an emulator, documentation, sample code, and tutorials. Android

development tools (ADT) plug-in for Eclipse is an extension to the Eclipse IDE that

supports the creation and debugging of android application. In case of android, the

most recommended integrated development environment is Eclipse, which is a multi-

language software development environment featuring an extensible plug-in system.

The version history of the Android mobile operating system began with the release of

the Android beta in November 2007. The first commercial version, Android 1.0, was

released in September 2008. Different versions of android by its API are listed as:

Versions

Android (1.0-1.1-1.5-1.6),

Android (2.0-2.0.1-2.1-2.2-2.2.3-2.3-2.3.2-2.3.3-2.3.7),

6 | P a g e

Page 7: android bluetooth chat

Android (3.0-3.1-3.2) and Android (4.0-4.0.2-4.0.3-4.0.4-4.1-4.2 Jelly Bean, API

level 17)

When we come in the part of layout design XML is mostly recommended for the

android platform. It is a markup language that defines a set of rules for encoding

documents in a format that is both human-readable and machine-readable. Android

provides a straightforward XML vocabulary that corresponds to the View classes and

subclasses, such as those for widgets and layouts. The advantage of declaring UI in

XML is that it enables to better separate the presentation of application from the code

that controls its behavior. In case of programming language Java is used for the

development of android apps because it is well known by developers, open source,

secured, faster, platform independent.

Wi-Fi is a popular technology that allows an electronic device to exchange data

wirelessly (using radio waves) over a computer network, including high-speed

Internet connections. The Wi-Fi Alliance defines Wi-Fi as any wireless local area

network (WLAN) products that are based on the Institute of Electrical and Electronics

Engineers' (IEEE) 802.11 standards. A device that can use Wi-Fi (such as a personal

computer, video-game console, Smartphone, digital camera, tablet or digital audio

player) can connect to a network resource such as the Internet via a wireless network

access point. Such an access point (or hotspot) has a range of about 20 meters (65

feet) indoors and a greater range outdoors. Hotspot coverage can comprise an area as

small as a single room with walls that block radio waves or as large as many square

miles.

Bluetooth is a wireless technology standard for exchanging data over short distances

(using short-wavelength radio transmissions in the ISM band from 2400–2480 MHz)

from fixed and mobile devices, creating personal area networks (PANs) with high

levels of security. Created by telecom vendor Ericsson in 1994, it was originally

conceived as a wireless alternative to RS-232 data cables. It can connect several

devices, overcoming problems of synchronization. Bluetooth operates in the range of

7 | P a g e

Page 8: android bluetooth chat

2400–2483.5 MHz (including guard bands). This is in the globally unlicensed

Industrial, Scientific and Medical (ISM) 2.4 GHz short-range radio frequency band.

Version Data rate Maximum rate

Version 1.2 1 Mbit/s 0.7 Mbit/s

Version 2.0 + EDR 3 Mbit/s 2.1 Mbit/s

Version 3.0 + HS 24 Mbit/s

Version 4.0

Bluetooth Protocol Stack:

Bluetooth is defined as a layer protocol architecture consisting of core protocols,

cable replacement protocols, telephony control protocols, and adopted protocols.

Mandatory protocols for all Bluetooth stacks are: LMP, L2CAP and SDP. In addition,

devices that communicate with Bluetooth almost universally can use these protocols:

HCI and RFCOMM.

Radio Frequency Communications (RFCOMM) is a cable replacement protocol used

to create a virtual serial data stream. RFCOMM provides a simple reliable data stream

to the user, similar to TCP. Many Bluetooth applications use RFCOMM because of

its widespread support and publicly available API on most operating systems.

Additionally, applications that used a serial port to communicate can be quickly

ported to use RFCOMM.

8 | P a g e

Page 9: android bluetooth chat

2.2. Methodology

Android development is a complex process, the successful implementation of

Android Mobile Application Development projects by and large depends on the

development approach itself. We at this level strongly believe in following a

systematic and professional development approach.

Agile Methodology:

Agile methods represent a relatively new approach to software development,

becoming wide-spread in the last decade. The ideas behind these methods originate

from the principles of Lean Manufacturing (in the 1940s) and Agile Manufacturing

(1990s), which emphasized the adaptability of enterprises to a dynamic environment

(Salo,2006). The unique features of agile methods derive from the list of principles

found in the “Agile Manifesto”: individuals and interactions are more important than

processes and tools, working software is more valuable than comprehensive

documentation, customer collaboration is preferred over contract negotiation, and

adaptability is valued higher than creating and following a plan (Agile Alliance,

2001).

Agile Development Model is based on iterative development, wherein the entire

software development life-cycle is broken down into smaller iterations (or parts). The

project scope and requirements are clearly laid down, at the start of the development

process. This type of model is best suited for large size projects as it helps to

minimize the overall risk and lets the project adapt to changes quickly.

9 | P a g e

Page 10: android bluetooth chat

Fig 4: Agile model

10 | P a g e

Page 11: android bluetooth chat

Chapter 3: Progress to date

3.1. Work Accomplished

List of work that we have carried out during the time of proposal submission to till

date are briefly described below. We are on the schedule and have tried to meet the

committed activities that were mentioned in the proposal.

Preliminary Research and Study

Since study and research has no any end and takes much time .We are almost at the

end of the project requirement analysis part. We have work through different

development tools and took the suggestion about android development, problems that

may encounter from the expertise. During research we have much spent time in

learning to use ADK (Android Development Kit) in Ecllipse. Since Ecllipse provides

an environment for android developer. Android application development is the most

growing technology in the recent IT field. This research has motivated us for further

development.

User Interface design

We have designed the UI of application with the help of XML which is known as

Activity in Android. This method greatly simplifies the UI design process, moving

much of the static creation and layout of user interface controls and definition of

control attributes, to the XML, instead of littering the code. It creates a potential

distinction between UI designers (who concern themselves more with layout) and

developers (who know Java and implement application functionality). Developers can

still alter the content of a screen programmatically when necessary. Complex

controls, like ListView or GridView, are usually populated with data

programmatically. XML layout resources are stored in the /res/layout project

directory.

11 | P a g e

Page 12: android bluetooth chat

The interface of the application is fancy and user friendly. Since our project is still in

development so we have used Android Virtual Device to mitigate the running

environment of the application in smart phone. Chat message box window have been

developed successfully. Unlike other modules are also in developing phase. Similarly

to carry out the functional work java class file and java code essential in our project.

12 | P a g e

Page 13: android bluetooth chat

Fig 5: User Interface

Development

We use Eclipse IDE as development tool which provides the integrated development

environment for android project development and requirements are coded in Java

programming language. Java programming language is used to code functional code

whereas XML code for layout. We have learned to use Eclipse and Android SDK.

Database design

For database we use SQLite which is the light weight database used in small projects

and also in android project development. The SQLite database is used in Android for

storing and managing application data. The SQLite database is an open source

lightweight transaction SQL database engine. There are other means of storing

application data in Android rather than a database (they are known as Preferences),

but those are more often used to store a very small amount of information, like

usernames and passwords, so that users are not prompted for their credentials every

time the application is started.

Communication and connection:

Any Bluetooth capable device is able to discover new device in a network on demand

by providing information such as: device name, device class and other technical

information. A Bluetooth device is able to connect with the help of UUID(universal

unique identifier) of neighbour device. UUID helps to uniquely identify device in a

network. Most commonly used identifier by the manufacturer of device is 48-bit

MAC address.

Application is capable of discovering device in network and establishing connection

between them. Further it successfully transmits a message through Bluetooth. Two

way Bluetooth chat can be made when message is typed in a chat box.

13 | P a g e

Page 14: android bluetooth chat

3.2. Work Remaining

To make our project complete and running some of the major works is to be done and

the works to be accomplished in coming future are listed below:

Enhancing the UI (User Interface)

To make the fancy look of the application we are planning to change the

designing to meet the standard of the market.

Explore computer

The main aim of our project is to explore pc via Bluetooth with help of

application. When two android devices are connected wirelessly, with limited

access privilege one can explore PC data e.g. text documents, image, videos,

Pdf files, music etc.

Wi-Fi tethering

Tethering refers to connecting one device to another. In the context of mobile

phones or Internet tablets, tethering allows sharing the Internet connection of

the phone or tablet with other devices such as laptops. Connection of the

phone or tablet with other devices can be done over wireless LAN (Wi-Fi),

over Bluetooth or by physical connection using a cable for example, through

USB. If tethering is done over Wi-Fi, the feature may be branded as a Mobile

Hotspot. The Internet-connected mobile device can thus act as a portable

wireless access point and router for devices connected to it.

Test in real devices

The final step of our projects is to publish our full complete project, test it in

all devices.

14 | P a g e

Page 15: android bluetooth chat

Documentation

Software documentation is the formal text written document which either

explains how it operates or how to use it, or may mean different things to

people in different roles. It includes different information about the project

e.g: requirement statements, system specification, technical statement and user

manual.

Since up to till date we have completed the basic architectural design part of the

application. We have to go through the detailed interior and exterior design of the

application. We were able to establish the Bluetooth connection between the devices

and able to send and receive message. Bluetooth 4.0 is the latest version which is said

to be low energy consuming technology and in near future most of the Smartphone

are going to integrate this technology. Our application is to work as communication

media using the recent technology

15 | P a g e

Page 16: android bluetooth chat

4. Problems Encountered

Every new project when we get involved in is likely to throw up different issues and

challenges but it is difficult to assume in advance what kind of problems will

percolate during a particular project. Some of the problem that encountered during

development phase is listed briefly as below:-

Emulator

An emulator is hardware or software or both that duplicates (or emulates) the

functions of one computer system in another computer system (the host), different

from the first one, so that the emulated behavior closely resembles the behavior of the

real system. The Android SDK includes a mobile device emulator — a virtual mobile

device that runs on our computer. The problem with android AVD is that it doesn’t

support Bluetooth and hence it has created a problem to test our applications without

using a physical device.

Testing in real device

The major problem we encountered during course of our project development is with

the project testing. Since the Android Emulator does not support Bluetooth it was had

for us to try test our code for Switching, Bluetooth connection and paring devices.

Since our application is targeted for android version 4.0 and above, so device with

this configuration is still in the process of procurement at department.

Bugs and errors

Software bugs and errors are very common in the jargon of software development.

We cannot neglect those errors but should handle carefully. A software bug is an

error, flaw, failure, or fault in a computer program or system that produces an

incorrect or unexpected result, or causes it to behave in unintended ways. Due to our

inexperience in development of android application, we have to come through

16 | P a g e

Page 17: android bluetooth chat

enormous bugs and errors. Some of them were easily recoverable while others created

a serious problem and took lots of time to recover them.

Design

The overall system design is the creative part of the project and it takes much

brainstorming of the team members. It is really a challenging task to meet the system

requirements with best designing. Due to inexperience in our work, it was difficult to

finalize the best design.

Guidance and Support

Since android development is a complex process and it was not a common project.

Android is upcoming technology, so expert in it are very less in number and we could

not get proper guidance. Many bugs and errors created an ambiguity during the

development, which sometimes made us hopeless.

Time management

Time has great significance in every aspects of our life, it is the key factor for the

success. During our academic life it is very difficult to manage time. And at the

project development phase it was a major problem that we couldn’t meet the

committed time period as mentioned in proposal.

Team coordination

Obviously all team members are not always available due to their own personal

circumstances. Also all members are not equally talented.

17 | P a g e

Page 18: android bluetooth chat

5. Conclusion

Hence, at the time of preparation of this progress report we have come up to the (50-

65) % of the project. Since developing a Android application is not a regular task for

us as we are new at this and we need to develop our base in developing Android

application its been hard but interesting and a opportunity to learn and enter in a new

field of software application development. We have designed the graphic UI in XML

since it is the most convenient and maintainable way to design application user

interfaces is by creating XML layout resources. Application is designed for smart

phone so we created fancy icons, buttons, chat box for the fancy look.

The main problem was we had a hardware inconvience for testing the project.

Android emulator doesn’t support for Bluetooth connectivity and pairing of devices.

Despite of several limitations and complexity we are eagerly working hard in project

and will meet our commitment in the stated time.

Concluding to the report we have included all our project activity up to now, task

remaining, problem encountered and theories related to our projects.

18 | P a g e

Page 19: android bluetooth chat

References

www.wrox.com, 3 Feb, 2013

www.androiddeveloper.com, 10 March, 2013

www.androidbigresource.com, 5 June, 2013

19 | P a g e