Chapter One: Real Time Android Application (Text) Through Socket Using Bluetooth Technology Page 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 56

CHAPTER ONE

INTRODUCTION

1.0 Background of the study


Bluetooth chatting is an innovative approach to the mobile world. This application
shows use of Bluetooth in terms of chatting. Means persons can chat via Bluetooth.
The main screen has just a list which has two values server and client. By selecting
one of these two values, the corresponding instance is created. Main screen is used to
initialize the connection. It does following thing at here. First, it starts the application
and search the Bluetooth device. It sends the signal to the server class. Second, it can
run, pause and stop the application. Third, it shows alert using set Alert function on
every changing. Server class goes active when it go signal from the main class. It
sends the hello world string with the string to the other devices. Client class works to
respond the other Bluetooth device server. Bluetooth is named after a Danish king,
Harald Bluetooth, who ruled from 940 to 985 AD. During his reign, Bluetooth was
able to unite Denmark and part of Norway into a single kingdom. In 1994 according
to Ericsson started researching short-range wireless technology. That could be used
between their cellular phones and peripheral devices, such as a headset. In 1998
according to Ericsson, Nokia, IBM, Toshiba, and Intel came together to form a
Special Interest Group (SIG). These companies were chosen because of Ericsson and
Nokia’s leadership in mobile telephones, IBM and Toshiba’s leadership in laptop
computing, and Intel’s leadership in digital signal processing technology. In four short
years, the original five companies, in the SIG, have turned into 1500. Bluetooth’s
original mission was to replace all of the cables that tie up today’s complex world.
There are many cables plugged into the back of a computer for instance, a monitor, a
keyboard, a mouse, and a printer. The location of the correct plug can become very
confusing for the user, as more ‘‘plugged-in’’ devices are introduced; this is where
Bluetooth comes in. The developers of Bluetooth soon realized that this technology is
capable of much more than just connecting peripheral devices. It can work as a lower
speed wireless network, allowing connection through access points at any location.
Bluetooth is also a universal standard and can be used wherever you go, which makes
it extremely powerful. Some current devices that are not Bluetooth enabled can add
Bluetooth capability via PC cards or USB adaptors. As this technology continues to
grow more and more devices will come with Bluetooth chips built-in. There are many

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
1
devices on the market that already have Bluetooth built into them, such as phones,
laptops, and PDAs. As more of these devices are released to the public, Bluetooth’s
place in society will be sealed. Bluetooth is one of the leading wireless technologies
and also the fastest growing standard wireless data communication technology in the
world with the benefit of low power consumption at a low cost. Bluetooth is
supported by many ICT (Information and Communication Technologies) companies,
therefore a large number of Bluetooth applications and products have been introduced
commercially. In recent years, Bluetooth has become a standard incorporated in a
large number of Bluetooth devices ranging from keyboards, mice, and printers to
handhelds, laptops, and mobile phones. The objective of this paper is to demonstrate
how Bluetooth technology establishes communication between devices. It starts off
by researching Bluetooth technology background, protocol and compares with other
wireless technologies, then design an application which can perform an automatic
Bluetooth connectivity task between a mobile phone and a computer/server. The study
focuses on using Bluetooth open-source code from Nokia PC connectivity API, to
develop a Bluetooth-enabled application using Microsoft .NET. This application
synchronizes files between mobile phone and a computer/server automatically.
Bluetooth is a wireless technology that can be used for short-ranged communication
between different Bluetooth enabled devices. Some of its common functions are
passing and synchronizing data, such as a PDA and computer, and connecting to the
Internet. Bluetooth works in the unlicensed 2.4-GHz industrial, scientific, and medical
(ISM) band and uses frequency-hopping spread-spectrum (FHSS) communication,
which transmits data over different frequencies at different time intervals. This is
accomplished by making ‘‘hops’’ to different frequencies through the ISM band. A
device makes about 1600 hops per second, which is spaced out over 1 MHz. Unlike
most devices, Bluetooth enabled devices communicate with each other automatically.
There is no need to specify what type of action to take place or when it should to
happen. When two devices are within range of each other, they will communicate
back and forth to determine if there is any information to be passed. During initial
communication, it is necessary to create a relationship between unknown devices; this
process is referred to as pairing. During the paring process, a secret PIN is created that
is only known by the two devices that are communicating. It is better for the user to
manually enter a PIN, and make it complex, in order to make the code hard to break.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
2
Since Bluetooth is a wireless protocol, anyone with an appropriate receiver can
intercept transmissions. In order to reduce hacking, Bluetooth supports device
authentication, which means, devices that share information use a shared secret key,
or link key to authenticate one another. If the devices have communicated in the past,
they will share a common link key, which can take two forms. The first, and least
secure, is a unit key. A unit key is the same secret key for every device that has
established a connection. For example, if a PDA and a Mobile Phone exchange
information, then later that same PDA and notebook computer share information, all
three devices will share the same unit key, leaving them much more accessible to
attacks. It is recommended that a unit key only be used for devices with limited
memory and limited user interface devices. The second, and much more secure, is a
combination key. Combination keys are unique and change each time the devices
make a new connection, so no two devices share the same key. Since the keys are
different, it is much easier to protect the communication between the devices

1.1 Statement of the problem


Chatting has largely been a PC-based addiction. But when it comes to
chatting over cell phones, the alternatives are costly like GPRS-based IMs (Internet
Messenger) or TEXT (Short Message Service) chat. Most of the major problems that
affect the existing system are as follows:

1. Costly chat and subscription most be done with ISP or service provider.

2. The problems of chatting via Wi-Fi internet facilities without Data


Bundle.
3. Consume much power for proper Transmission.

That explain in the absence of internet data connect or service provider network no
data/text transmission will be performed.

1.2 Aim and Objectives


The Aim of this project research is to develop a chatting engine that can exchange text
that run on Android Devices using Bluetooth Connectivity Technology.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
3
1. Develop an android application for chatting or data/text transmission
2. Develop a system for communication with a limited range of distance
3. Exchange of information via wireless communication media.
4. Develop a system using android framework to communicate via
Bluetooth technology.
5. Develop an android application with the capability of data exchange
Without internet facilities
6. Develop a chatting android application without charges.

1.3 Significant of Study


This research work lays emphasis on the development of android application the
automatically eradicate the use of data bundle from ISP to exchange data/text by
individual or group for the purpose of information dissemination, and at a very low
energy consumption and low cost of equipment and no charges, in the absence of
GSM and Wi-Fi connectivity.

1.4 Scope and Limitation


This project covers the boundary of developing an android chatting application that
uses Bluetooth transmission technology for transmission for data exchange. Data are
exchange based on real-time transmission architecture mode, Wi-Fi and Internet
Connectivity are not required.

1.5 Definition of Terms


Bluetooth: a standard for the short-range wireless interconnection of mobile phones,
computers, and other electronic devices. send (a photograph or other piece of data)
from one electronic device to another via Bluetooth.
Technology: The application of scientific knowledge for practical purposes,
especially in industry. Machinery and devices developed from scientific knowledge.
A Branch of knowledge dealing with engineering or applied sciences.
Device: A thing made or adapted for a particular purpose, especially a piece of
mechanical or electronic equipment. a plan, method, or trick with a particular aim.
Android Application Framework: is a platform for developing software
applications. It provides a foundation on which software developers can build

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
4
programs for a specific platform. For example, a framework may include predefined
classes and functions that can be used to process input, manage hardware devices, and
interact with system software. This streamlines the development process since
programmers don't need to reinvent the wheel each time they develop a new
application.
Android Software Development Kit: A software development kit that enables
developers to create applications for the Android platform. The Android SDK
includes sample projects with source code, development tools, an emulator, and
required libraries to build Android applications.
Interactive Development Environment: An integrated development environment
(IDE) is a software application that provides comprehensive facilities to computer
programmers for software development. An IDE normally consists of a source code
editor, build automation tools and a debugger.
Emulator: Managing Virtual Devices. An Android Virtual Device (AVD) is an
emulator configuration that lets you model an actual device by defining hardware and
software options to be emulated by the Android Emulator.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
5
CHAPTER TWO
LITERATURE REVIEW

2.1 Theoretical Framework


Bluetooth is a low cost, low power, short-range radio technologies intended to replace
the cable connections between hand phones, PDAs and other portable devices. It can
clean up your desk considerably, making wires between your workstation, mouse,
laptop computer and many other devices. Ericsson Mobile Communication started
developing their Bluetooth system in 1994, looking for a replacement to the cables
connecting their hand phones and their accessories. The Bluetooth system is named
after a tenth-century Danish Viking King, Harald Blatand, who united and controlled
Norway and Denmark. The first Bluetooth devices hit market around 1999.

Figure 2.0 Bluetooth Icon


The Bluetooth SIG is responsible for the further development of the Bluetooth
standard. Sony Ericsson, Intel, IBM, Toshiba, Nokia, Microsoft and Motorola are
some of the companies involved in the SIG. The composition of the Bluetooth SIG is
one of the major strength of the Bluetooth technology. The mixture of both software
and hardware supplier participating in the further development of the Bluetooth
technology ensures that Bluetooth products are made available to end users. Microsoft
support Bluetooth in their Microsoft Windows Operating System. Bluetooth software
is made available to the vast majority of the desktop software market. Nokia and Sony
Ericsson include Bluetooth technology in their latest hand phones. This all adds up to
a wide availability of the Bluetooth technology for end users. Information of more
commercial nature about Bluetooth technology is available on the Bluetooth
technology website.

2.1.1 Bluetooth Architecture


The Bluetooth specification aims to allow Bluetooth devices from different
manufactures to work with each other, so it is not sufficient to specify just a radio
system. Because of this, the Bluetooth specification does not only outline a radio

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
6
system but a complete protocol stack to ensure that Bluetooth devices can discover,
explore and use these services with each other.

Figure 2.1 The Bluetooth Protocol Stack


The Bluetooth stack is made up of many layers. The HCI is usually the layer
separating hardware from software and is implemented partially in software and
hardware. The layers below HCI are usually implemented in hardware in software.
Description of Bluetooth Protocol Stack

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
7
Figure 2.2 Layer and Description
An understanding of how the Bluetooth radio works is importance. The Bluetooth
radio is a lowest layer of Bluetooth communication. The Industrial, Scientific and
Medical (ISM) band at 2.4 GHz is used for radio communication 02.11b/g and
microwave oven may cause interference in this band. The Bluetooth radio utilizes a
signaling technique called Frequency Hopping Spread Spectrum (FHSS). The radio
band is divided into 79 sub-channels. The Bluetooth radio uses one of these frequency
hops per second. Frequency hopping is used to reduce interference caused by nearby
Bluetooth devices and other devices that using the same frequency band. n. Several
technologies used this band as well. For example Wi-Fi technologies like IEEE 8
channels at a given time.

2.1.2 Android Platform


Operating system has developed a lot in last 15 years. Starting from black and white
phones to recent smart-phones or mini computers, mobile OS has come far away. One
of the most widely used mobile OS these days is ANDROID. Android does a software
bunch comprise not only operating system but also middleware and key applications.
After original release there have been number of updates in the original version of
Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
8
Android. It is the software stack of mobile devices. Android SDK provides the API's
that is necessary to begin developing applications on the Android platform using the
Java programming language. Android includes an embeddable browser built upon
WebKit, the same open source browser engine powering the iPhone's Mobile Safari
browser. An Android application consists of one or more of the following
classifications:
1) Activities: Is the application that has a visible UI is implemented with an activity.
When a we selects an application from the home screen or application launcher, an
activity is started.
2) Services: A service should be used for any application that needs to persist for a
long time, such as a network monitor or update-checking application.
3) Content providers: We A content provider's job is to manage access to persisted
data, such as a SQLite database. Suppose for the bigger system like Speech to text
conversion system or one that makes data available to multiple activities or
applications, a content provider is the means of accessing your data.
4) Broadcast receivers: This is use to launched to process a element of data or
respond to an event, such as the receipt of a text message. Following figure showing
the Architecture of Android platform. The key application of the speech to text
conversion system is recognition technology. Speech input adds another dimension to
the mobile phones. The Google's Voice Search application, which is required, is many
times pre-installed on many Android devices and available in Android Market, and it
provides powerful features. Now we can dictate our message instead of typing it. Just
tap the new microphone button on the keyboard, and you can speak in just about any
context in which you would normally type.

Table 1: Android Architecture


Application
Application Framework
Libraries Android Routine
Linux Kernel

2.1.3.1 Features of Android Application Interface

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
9
Android's default user interface is mainly based on direct manipulation, using touch
inputs that loosely correspond to real-world actions, like swiping, tapping, pinching,
and reverse pinching to manipulate on-screen objects, along with a virtual keyboard.
Game controllers and full-size physical keyboards are supported via Bluetooth or
USB. The response to user input is designed to be immediate and provides a fluid
touch interface, often using the vibration capabilities of the device to provide hepatic
feedback to the user. Internal hardware, such as accelerometers, gyroscopes and
proximity sensors are used by some applications to respond to additional user actions,
for example adjusting the screen from portrait to landscape depending on how the
device is oriented, or allowing the user to steer a vehicle in a racing game by rotating
the device, simulating control of a steering wheel.
Android devices boot to the home screen, the primary navigation and information
"hub" on Android devices that is analogous to the desktop found on personal
computers. (Android also runs on regular personal computers, as described below).
Android home screens are typically made up of app icons and widgets; app icons
launch the associated app, whereas widgets display live, auto-updating content, such
as the weather forecast, the user's email inbox, or a news ticker directly on the home
screen. A home screen may be made up of several pages, between which the user can
swipe back and forth, though Android's home screen interface is heavily
customizable, allowing users to adjust the look and feel of the devices to their tastes
Third-party apps available on Google Play and other app stores can extensively re-
theme the home screen, and even mimic the look of other operating systems, such as
Windows Phone. Most manufacturers, and some wireless carriers, customize the look
and feel of their Android devices to differentiate themselves from their competitors.
Applications that handle interactions with the home screen are called "launchers"
because they, among other purposes, launch the applications installed on a device.
Along the top of the screen is a status bar, showing information about the device and
its connectivity. This status bar can be "pulled" down to reveal a notification screen
where apps display important information or updates, such as a newly received email
or SMS text, in a way that does not immediately interrupt or inconvenience the user.
Notifications are persistent until read by tapping it, which opens the relevant app, or
dismissed by sliding it off the screen. Beginning on Android 4.1, "expanded
notifications" can display expanded details or additional functionality; for instance, a

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
10
music player can display playback controls, and a "missed call" notification provides
buttons for calling back or sending the caller an SMS message.
Android provides the ability to run applications that change the default launcher, and
hence the appearance and externally visible behaviour of Android. These appearance
changes include a multi-page dock or no dock, and many more changes to
fundamental features of the user interface.
Application
Applications ("apps"), which extend the functionality of devices, are written using the
Android software development kit (SDK) and, often, the Java programming language
that has complete access to the Android APIs. Java may be combined with C/C++,
together with a choice of non-default runtimes that allow better C++ support, the Go
programming language is also supported since its version 1.4, which can also be used
exclusively although with a restricted set of Android APIs. The SDK includes a
comprehensive set of development tools, including a debugger, software libraries, a
handset emulator based on QEMU, documentation, sample code, and tutorials.
Initially, Google's supported integrated development environment (IDE) was Eclipse
using the Android Development Tools (ADT) plugin; in December 2014, Google
released Android Studio, based on IntelliJ IDEA, as its primary IDE for Android
application development. Other development tools are available, including a native
development kit (NDK) for applications or extensions in C or C++, Google App
Inventor, a visual environment for novice programmers, and various cross platform
mobile web applications frameworks. In January 2014 according to Google unveiled
an framework based on Apache Cordova for porting Chrome HTML 5 web
applications to Android, wrapped in a native application shell.
Android has a growing selection of third-party applications, which can be acquired by
users by downloading and installing the application's APK (Android application
package) file, or by downloading them using an application store program that allows
users to install, update, and remove applications from their devices. Google Play Store
is the primary application store installed on Android devices that comply with
Google's compatibility requirements and license the Google Mobile Services
software. Google Play Store allows users to browse, download and update
applications published by Google and third-party developers; as of July 2013, there
are more than one million applications available for Android in Play Store. As of July

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
11
2013, 50 billion applications have been installed. Some carriers offer direct carrier
billing for Google Play application purchases, where the cost of the application is
added to the user's monthly bill.
Due to the open nature of Android, a number of third-party application marketplaces
also exist for Android, either to provide a substitute for devices that are not allowed to
ship with Google Play Store, provide applications that cannot be offered on Google
Play Store due to policy violations, or for other reasons. Examples of these third-party
stores have included the Amazon Appstore, GetJar, and SlideMe. F-Droid, another
alternative marketplace, seeks to only provide applications that are distributed under
free and open source licenses.

Memory Management
Since Android devices are usually battery-powered, Android is designed to manage
processes to keep power consumption at a minimum. When an application is not in
use the system suspends its operation so that, while available for immediate use rather
than closed, it does not use battery power or CPU resources.
Android manages the applications stored in memory automatically: when memory is
low, the system will begin invisibly and automatically closing inactive processes,
starting with those that have been inactive for longest. Life hacker reported in 2011
that third-party task killers were doing more harm than good.

Hardware
The main hardware platform for Android is the ARM (ARMv7 and ARMv8-A
architectures), with x86 and MIPS architectures also officially supported in later
versions of Android. Since Android 5.0 "Lollipop", 64-bit variants of all platforms are
supported in addition to the 32-bit variants. The unofficial Android-x86 project
provided support for the x86 architectures ahead of the official support. MIPS
architecture was also supported before Google did. Since 2012, Android devices with
Intel processors began to appear, including phones and tablets. While gaining support
for 64-bit platforms, Android was first made to run on 64-bit x86 and then on
ARM64.
Requirements for the minimum amount of RAM for devices running Android 5.1
range from 512 MB of RAM for normal-density screens, to about 1.8 GB for high-

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
12
density screens.[85] The recommendation for Android 4.4 is to have at least 512 MB of
RAM, while for "low RAM" devices 340 MB is the required minimum amount that
does not include memory dedicated to various hardware components such as the
baseband processor. Android 4.4 requires a 32-bit ARMv7, MIPS or x86 architecture
processor (latter two through unofficial ports), together with an OpenGL ES 2.0
compatible graphics processing unit (GPU). Android supports OpenGL ES 1.1, 2.0,
3.0 and 3.1. Some applications may explicitly require a certain version of the OpenGL
ES, and suitable GPU hardware is required to run such applications. Android devices
incorporate many optional hardware components, including still or video cameras,
GPS, orientation sensors, dedicated gaming controls, accelerometers, gyroscopes,
barometers, magnetometers, proximity sensors, pressure sensors, thermometers, and
touch-screens. Some hardware components are not required, but became standard in
certain classes of devices, such as smart-phones, and additional requirements apply if
they are present. Some other hardware was initially required, but those requirements
have been relaxed or eliminated altogether. For example, as Android was developed
initially as a phone OS, hardware such as microphones were required, while over time
the phone function became optional. Android used to require an autofocus camera,
which was relaxed to a fixed-focus camera if present at all, since the camera was
dropped as a requirement entirely when Android started to be used on set-top boxes.
In addition to running on smart-phones and tablets, several vendors run Android
natively on regular PC hardware with a keyboard and mouse. In addition to their
availability on commercially available hardware, similar PC hardware friendly
versions of Android are freely available from the Android-x86 project, including
customized Android 4.4. Using the Android emulator that is part of the Android SDK,
or by using BlueStacks or Andy, Android can also run non-natively on x86. Chinese
companies are building a PC and mobile operating system, based on Android, to
"compete directly with Microsoft Windows and Google Android". The Chinese
Academy of Engineering noted that "more than a dozen" companies were customizing
Android following a Chinese ban on the use of Windows 8 on government PCs.

Development
Android is developed in private by Google until the latest changes and updates are
ready to be released, at which point the source code is made available publicly. This

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
13
source code will only run without modification on select devices, usually the Nexus
series of devices. The source code is, in turn, adapted by OEMs to run on their
hardware. Android's source code does not contain the often proprietary device drivers
that are needed for certain hardware components.
In 2007, the green Android logo was designed for Google by graphic designer Irina
Blok. The design team was tasked with a project to create a universally identifiable
icon with the specific inclusion of a robot in the final design. After numerous design
developments based on science-fiction and space movies, the team eventually sought
inspiration from the human symbol on restroom doors and modified the figure into a
robot shape. As Android is open-sourced, it was agreed that the logo should be
likewise, and since its launch the green logo has been reinterpreted into countless
variations on the original design.

Update schedule
Google provides major incremental upgrades to Android every six to nine months,
with confectionery-themed names, which most devices are capable of receiving over
the air. The latest major release is Android 6.0 "Marshmallow".
Compared to its primary rival mobile operating system, iOS, Android updates
typically reach various devices with significant delays. Except for devices with the
Google Nexus brand, updates often arrive months after the release of the new version,
or not at all. This is partly due to the extensive variation in hardware of Android
devices, to which each upgrade must be specifically tailored, as the official Google
source code only runs on their own Nexus devices. Porting Android to specific
hardware is a time- and resource-consuming process for device manufacturers, who
prioritize their newest devices and often leave older ones behind. Hence, older
smartphones are frequently not updated if the manufacturer decides it is not worth the
investment of resources, although the device may be compatible. This problem is
compounded when manufacturers customize Android with their own interface and
apps, which must be reapplied to each new release. Additional delays can be
introduced by wireless carriers who, after receiving updates from manufacturers,
further customize and brand Android to their needs and conduct extensive testing on
their networks before sending the upgrade out to users.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
14
The lack of after-sale support from manufacturers and carriers has been widely
criticized by consumer groups and the technology media. Some commentators have
noted that the industry has a financial incentive not to upgrade their devices, as the
lack of updates for existing devices fuels the purchase of newer ones, an attitude
described as "insulting". the guardian complained that the method of distribution for
updates is complicated only because manufacturers and carriers have designed it that
way. In 2011 Google partnered with a number of industry players to announce an
"Android Update Alliance", pledging to deliver timely updates for every device for 18
months after its release; however, there has not been another official word about that
alliance since its announcement.
In 2012 Google began decoupling certain aspects of the operating system (particularly
core applications) so they could be updated through Google Play Store independently
of the operating system. One of these components, Google Play Services, is a closed-
source system-level process providing APIs for Google services, installed
automatically on nearly all devices running Android version 2.2 and higher. With
these changes, Google can add new operating system functionality through Play
Services and application updates without having to distribute an upgrade to the
operating system itself. As a result, Android 4.2 and 4.3 contained relatively fewer
user-facing changes, focusing more on minor changes and platform improvements.
Linux kernel

Android's kernel is based on one of the Linux kernel's long-term support (LTS)
branches. Since April 2014, Android devices mainly use versions 3.4 or 3.10 of the
Linux kernel. The specific kernel version depends on the actual Android device and
its hardware platform; Android has used various kernel versions since the version
2.6.25 that was used in Android 1.0.

Android's variant of the Linux kernel has further architectural changes that are
implemented by Google outside the typical Linux kernel development cycle, such as
the inclusion of components like Binder, ashmem, pmem, logger, wakelocks, and
different out-of-memory (OOM) handling. Certain features that Google contributed
back to the Linux kernel, notably a power management feature called "wakelocks",
were rejected by mainline kernel developers partly because they felt that Google did
not show any intent to maintain its own code. Google announced in April 2010 that

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
15
they would hire two employees to work with the Linux kernel community, but Greg
Kroah-Hartman, the current Linux kernel maintainer for the stable branch, said in
December 2010 that he was concerned that Google was no longer trying to get their
code changes included in mainstream Linux. Some Google Android developers hinted
that "the Android team was getting fed up with the process," because they were a
small team and had more urgent work to do on Android.

In August 2011, Linus Torvalds said that "eventually Android and Linux would come
back to a common kernel, but it will probably not be for four to five years". In
December 2011, Greg Kroah-Hartman announced the start of Android Mainlining
Project, which aims to put some Android drivers, patches and features back into the
Linux kernel, starting in Linux 3.3. Linux included the autosleep and wakelocks
capabilities in the 3.5 kernel, after many previous attempts at merger. The interfaces
are the same but the upstream Linux implementation allows for two different suspend
modes: to memory (the traditional suspend that Android uses), and to disk (hibernate,
as it is known on the desktop). Google maintains a public code repository that
contains their experimental work to re-base Android off the latest stable Linux
versions.

The flash storage on Android devices is split into several partitions, such as system
for the operating system itself, and data for user data and application installations. In
contrast to desktop Linux distributions, Android device owners are not given root
access to the operating system and sensitive partitions such as system are read-only.
However, root access can be obtained by exploiting security flaws in Android, which
is used frequently by the open-source community to enhance the capabilities of their
devices, but also by malicious parties to install viruses and malware.

Android is a Linux distribution according to the Linux Foundation, Google's open-


source chief Chris DiBona, and several journalists. Others, such as Google engineer
Patrick Brady, say that Android is not Linux in the traditional Unix-like Linux
distribution sense; Android does not include the GNU C Library (it uses Bionic as an
alternative C library) and some of other components typically found in Linux
distributions.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
16
2.1.3 Internet Based Monitoring
Internet monitoring is one of the common approaches for remote monitoring. Many
researchers have worked in field of Internet based remote monitoring. According to
(Saito et al., 2000) developed home gateway system for interconnecting home
network consisting of IEEE 1394 AV network and X10 power line home automation
network with Internet. This provided remote access functions from Internet for digital
AV appliances like Digital Video Camera, Digital VCR connected to IEEE 1394
network and home appliances like TV, desk lamp, electric fan connected to X10
controller. (Al-Ali and Al-Rousan, 2004) developed Java based home automation
system via World Wide Web. The home appliances were controlled from ports of
embedded system board connected to PC based server at home. (Alkar and Buhur,
2005) implemented Internet based wireless flexible solution where home appliances
are connected to slave node. The slave nodes communicate with master node through
RF and master node has serial RS232 link with PC server. The nodes are based on
PIC 16F877 μc. PC server is formed of a user interface component, the database and
the web server components. An Internet page has been setup running on a Web server.
The user interface and the Internet front end are connected to a backend data base
server. The control of devices is established and their condition is monitored through
the Internet. According to (Al-Khateeb et al., 2009) used X10 controller interfaced
through serial port to PC server for control of devices. The Common Gateway
Interface (CGI) is used to interface between the browser and the X10 protocol via http
connection. The server executes CGI programs in order to satisfy a particular request
from the browser, which expresses its request using the http. According to (Peng Liu
et al., 2007) developed model of web services based email extension for remote
monitoring of embedded systems which integrates web services into emails. It uses a
general purpose email messaging framework to connect devices and manipulators.
This low cost model fits for systems with low connection bandwidth, small data
transportation volume and non real- time control, e.g., monitoring of home appliances
and remote meter-reading. According to (Tan and Soy, 2002) developed a system for
controlling home electrical appliances over the Internet by using Bluetooth wireless
technology to provide a link from the appliance to the Internet and Wireless
Application Protocol (WAP) to provide a data link between the Internet and a mobile
phone. However, technical details relating controller are not revealed. According to

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
17
(Nikolova et al., 2002) demonstrated that the control of home appliances can be
extended beyond the home network to wireless mobile networks without any
modification in the network specifications. This was accomplished by developing and
implementing a HAVi (Home Audio Video Interoperability) - WAP UI gateway that
intermediates between a wired home network and a wireless communication network
using HAVi and WAP specifications, respectively. The gateway use both pull and
push technologies, improves the network integration and provides opportunities for
developing applications that combine mobile devices with home network devices.
according to (Yen-Shin Lai et al., 2002) developed an Internet-based monitoring and
control of fuzzy controlled inverter for air conditioning system. The system consists
of client/server, programmable logic controller, D/A modules, inverters, induction
motors and the temperature sensing modules. The client accepts the command from
the user and can also access the database created in server, using Internet Explorer
(IE) Browser. The server performs function of fuzzy logic control, communication
interface between server and PLC, and receiving command from client. Furthermore,
the server also creates a database of the sensed temperature, speed of inverter-
controlled motor drives, and reference command. According to (Ximin et al., 2005)
designed and implemented an Internet home automation system. The design uses an
embedded controller based on C8051F005 microcontroller which is connected to a
PC-based home Web server via RS232 serial port. The home appliances are
connected to the input/output ports and the sensors are connected to the analog/digital
converter channels of the embedded controller. The software of the system is based on
the combination of Keil C, Java Server Pages, and JavaBeans, and dynamic DNS
service (DDNS) client. Password protection is used to block the unauthorized user
from accessing to the server. According to (Colak Ilhami et al., 2008) developed
Internet controlled Heating Ventilation Air Conditioning (HVAC) system. The system
can be controlled by three different units (web based remote control, remote control
by hand-held device and keypad control mounted on AC). The hardware system of
AC is controlled by PIC16F877 microcontroller. A DAQ board inserted into PCI bus
of web server is used to control system over web. User is able to access system
parameters over web by logging and setting parameters on forms available on main
control page. User submits forms to web server having CGI program which performs
requested tasks and reports status of system operation. The current operational

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
18
parameters of the system are measured by microcontroller and displayed on LCD.
Using web camera focused on LCD, these parameters are monitored online by client
PC. According to (Chen Chao et al., 2009) developed a remote wireless monitoring
system for off grid Wind turbine based on the GPRS and the Internet. The remote
monitoring system is made up of three parts: controlling terminal, central monitoring
computer and communication network. Controlling terminal consists of
microcontroller ARM7 LM3S1138, data acquisition module and GPRS
communication module WAVECOM Q2406B connected to ARM7 system using
serial port. GPRS module sends parameters relating wind turbine to central
monitoring computer. The client can access central monitoring computer server
through Internet and know parameters of different wind turbines. According to
(Kumari and Malleswaran, 2010) developed real time based equipment condition
monitoring and controlling system using embedded web based technology which
directly connects the equipment to network as a node. The embedded system consists
of ARM7 based LPC 2148 microcontroller board, A/D, signal conditioning, sensors,
and communications interface. The function of web based system is to collect the real
time data information of the on-site equipment and remotely send the data in the form
of user defined data transmission style. The remote Computer collects the data and
running status through the network and provides the comparison on the historical
data. If the parameter value is different from the original set value, the corrected
signal is sent to the control unit. The embedded remote monitoring system completes
the data Collection in the embedded platform and provides the data to remote host
through the TCP/IP protocol from Web server. It creates condition to realize
unattended management through providing Web-based graphical management
interface for the Internet or LAN users. (Burger and Frieder, 2007) introduced Key
Press Markup Language (KPML) and SIP Event Package to control devices in the
home environment remotely without the need for specialized hardware in the home
devices. KPML provides an efficient, reliable protocol for the remote control of
consumer devices using plain old telephones with 12-digit keypads using Internet
transport technologies. According to (Hongping and Kangling, 2010) proposed the
architecture of embedded remote monitoring system based on Internet. The system
adopts embedded web server as a central monitoring node and results in improvement
in stability and reliability of system. Moreover, utilization of dynamic monitoring web

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
19
based on Java Applet improves the response capability and brings convenience for
complex monitoring web design. According to (Zhu and Cui, 2007) developed remote
intelligent monitoring system based on embedded Internet technology for device-
room monitoring of the campus network. The Intelligent Monitoring Terminal (IMT)
is provided with the functions of Embedded Internet Node Unit and local MSD
(Monitoring System Devices). IMT can give alarm of theft or fire according to
detection analysis of temperature, sound and smog. And it also can connect to Internet
for carrying out remote data communication. The MCU S3C44B0, which utilize 32-
bit ARM kernel, is adopted in intelligent monitoring terminal. μ Clinux operating
system is chosen as the software core of embedded system. It offers self-contained
TCP/IP network protocol module and provides strong support for embedded Internet
technology. According to (Liu Zhong-xuan et al., 2010) designed wireless remote
monitoring system based on the GPRS according to (General Packet Radio Service)
and the MCU (Micro programmed Control Unit). System is based on 89C58
microcontroller and PIML GPRS-MODEM as the core, can collect data from eight
sensors, control two-way Data Acquisition, in the local real-time display and support
remote Internet monitoring. The data from sensors are encoded, sent to the WEB
server (fixed IP address or fixed domain name website) through the GPRS channel.
The system also accepts commands from remote monitoring centre.
(Bing Li et al., 2008) developed wireless remote image monitoring system based on
GSM/GPRS and ARM_Linux developing environment. The monitoring system uses
S3C2410 RISC MCU -ARM920Core, USB Web camera, SD Card and UART GPRS
module. ARM Linux operating system is loaded on SD Card. APIs of Video4Linux
kernel are used to realize image acquisition of the system, through PPP dial-up to
access the GPRS, through network programming to realize the transmission of the
image.
According to (Yang Musheng et al., 2008) developed application on remote
monitoring system of reservoir based on GPRS. GPRS data terminal hardware
includes the intelligent processing module, remote communication module, serial
interface module and display module. Intelligent processing module contains two
chips AT89C55 microcontroller and serial E2PROM X25045. AT89C55 is used to
transmit data between remote communication module, A/D conversion module and
display module. To ensure that data will not be lost because of power outages, serial

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
20
E2PROM X25045 device is adopted for data storage. Remote communication module
includes GPRS wireless module, SIM card and serial module MAX3238. Database
mainly stores various parameters of the flood accommodation procedures for the user
and reservoir historical hydrological data, such as electric power generated, relation
curve of water level flows, the water storage capacity curve, discharge curve, unit's
efficiency curve of different conditions, historical flood data and flood information.
According to (Ciubotaru-Petrescu et al., 2006) developed a system composed of
server which interfaces several video surveillance cameras including several
microphones for audio surveillance. This server captures video and audio streams
from the video cameras and microphones and operates on these streams according to
the configuration of the local control software module. This module can store the
video and audio streams on local hard-disks, index video and audio captures by time
and place, retrieve images and sound based on user specified time intervals and
deliver them to the user via Internet, or deliver (streaming) live images and sounds
from a predefined camera. The system is connected to the building power supply and
can be connected to the Internet via several communication solutions based on their
availability. In case of power grid failure the system is provided with a secondary
power supply based on rechargeable batteries which can keep the system functional
for several hours. The main weaknesses of this system are the power supply and the
Internet connection. To improve the reliability of this system, an autonomous
diagnosis system has been added to the main monitoring server. The system will
detect any change in the functioning state of the main system, like communication
link failure, power grid failure or internal power source depletion and will report these
events by sending a short message (TEXT).
According to (Yuksekkaya et al., 2006) developed wireless home automation system
by merging communication technologies of GSM, Internet and speech recognition.
GSM and Internet methods were used for remote access of devices of house whereas
speech recognition was designed for users inside the house. The communication
between the user and the home is established by the TEXT protocol. A GSM modem
is connected to the home automation server. The communication between the home
automation server and the GSM modem is carried out by the AT (Attention)
commands. To accomplish Internet connectivity, a web server is built to take requests
from remote clients. The clients can send requests to the home appliances. The home

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
21
appliances can send their statuses to be displayed for the remote client through the
server. A web page is constructed as an interactive interface where commands can be
submitted by the client to change and also monitor the status of the devices. A speech
recognition program is written to control the house by means of human voice.
Dynamic Time Warping (DTW) algorithm is used for speech recognition.
According to (Rasid and Woodward, 2005) developed a system to transmit a patient’s
biomedical signals directly to a hospital for monitoring or diagnosis, using mobile
telephone. The system consists of mobile telemedicine processor, which samples
signals from sensors on the patient. It then transmits digital data over a Bluetooth link
to a mobile telephone that uses the General Packet Radio Service. The mobile
processor consists of signal conditioning module, a peripheral control module, which
incorporates a PLD Altera Flex 10-K, a processor (AMD 186ES micro-controller) a
256-kB Flash ROM (AMD AM29F200T), a 512-kB Static RAM (Toshiba TC554 161
AFT), and an RS232 serial communication port along with Bluetooth communication
module (CSR BlueCore2-Flash) that supports Bluetooth radio transceivers Classes 2
and 3. The mobile telemedicine processor is first configured with the hospital server
IP address and establishes a Bluetooth link with the mobile telephone at power-up.
The mobile telephone is then configured with a mobile-to-host GPRS connection
(GPRS attachment and PDP context activation). Patient data are recorded and stored
in the processor’s memory module, typically for 10 min. Then the processor transmits
an AT-command to the mobile phone to initiate data transmission via the GPRS
network.

2.1.4 GSM-Text Based Monitoring


With the wide spread use of cellular networks, this approach is also popular when
small amount of data is to be transferred through the network. Extensive work has
been carried out by researchers using this approach especially in medical field.
According to (Chen Peijiang and Jiang Xuehua, 2008) describe a remote monitoring
system based on TEXT of GSM. The system includes two parts which are the
monitoring center and the remote monitoring station. The monitoring center consists
of a computer and a TC35 GSM communication module. The computer and TC35 are
connected by RS232. The remote monitoring station includes a TC35 GSM

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
22
communication module, a MSP430F149 MCU, a display unit, various sensors, data
gathering and processing unit.
According to (Scanaill et al., 2006) developed a tele-monitoring system, based on
Text, to remotely monitor the long-term mobility levels of elderly people in their
natural environment. Mobility is measured by an accelerometer-based portable unit,
worn by each monitored subject. The portable unit houses the Analog Devices
ADuC812S microcontroller board, Falcon A2D-1 GSM modem, and a battery-based
power supply. Two integrated accelerometers are connected to the portable unit
through the analog inputs of the microcontroller. Mobility level summaries are
transmitted hourly, as an Text message, directly from the portable unit to a remote
server for long-term analysis. Each subject’s mobility levels are monitored using
custom-designed mobility alert software, and the appropriate medical personnel are
alerted by Text if the subject’s mobility levels decrease. According to (Jiang et al.,
2008) proposed a system for early diagnosis of hypertension and other chronic
diseases. The proposed design consists of three main parts: a wrist Blood Pressure
(BP) measurement unit, a server unit and a terminal unit. Blood Pressure is detected
using data acquired by sensors intelligently using DSP microchip. The data is then
transmitted to the remote server unit located at Community Healthcare Centers/Points
(CHC/P) by using Short Messaging Service (Text), and notification information is
sent to the terminal unit to inform users if patient’s BP is abnormal. According
(Alheraish, 2004) implemented home security system by means of GSM cellular
communication network using microcontroller 89X52 and Sony Ericsson GM-47
GSM module. This system enables far end user through SMS facility to monitor the
state of home door, provide password facility for key based door lock and control
home lighting system.
According to (Xu Meihua et al., 2009) described a remote medical monitoring system
based on GSM (Global System for Mobile communications) network. This system
takes advantage of the powerful GSM network to implement remote communication
in the form of short messages and uses FPGA as the control center to realize the
family medical monitoring network. The system is made up of user terminal
equipments, GSM network and hospital terminal equipments. Hospital terminal
equipments can be a personal computer (connected with GSM modules) or other
receiving equipments such as the mobile phone of the related doctor, while user

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
23
terminal equipments are used to collect, demonstrate and transmit kinds of
physiological parameters. User terminal devices include the temperature acquisition
module, blood pressure/heart rate acquisition module, FPGA of Actel Fusion series,
information-sending and information-receiving module Siemens TC35 GSM module,
LCD displays and expansion modules. According to (Van Der Werff et al., 2005)
proposed a mobile-based home automation system that consists of a mobile phone
with Java capabilities, a cellular modem, and a home server. The home appliances are
controlled by the home server, which operates according to the user commands
received from the mobile phone via the cellular modem. In the proposed system the
home server is built upon an SMS/GPRS (Short Message Service/General Packet
Radio Service) mobile cell module Sony Ericsson GT48 and a microcontroller Atmel
AVR 169, allowing a user to control and monitor any variables related to the home by
using any java capable cell phone. According to (Ren-Guey Lee et al., 2007) proposed
and implemented a role-based intelligent mobile care system with alert mechanism in
chronic care environment. The roles included patients, physicians, nurses, and
healthcare providers. Each of the roles represented a person that uses a mobile phone
to communicate with the server setup in the care. For mobile phones with Bluetooth
communication capability attached to chronic patients, physiological signal
recognition algorithms were implemented and built-in in the mobile phone without
affecting its original communication functions. Several front-end mobile care devices
were integrated with Bluetooth communication capability to extract patients’ various
physiological parameters [such as blood pressure, pulse, saturation of hemoglobin
(SpO2), and electrocardiogram (ECG)], to monitor multiple physiological signals and
to upload important or abnormal physiological information to healthcare center for
storage and analysis or transmit the information to physicians and healthcare
providers for further processing. An alert management mechanism has been included
in back-end healthcare center to initiate various strategies for automatic emergency
alerts after receiving emergency messages or after automatically recognizing
emergency messages. According to (Yan Hongwei and Pan Hongxia, 2009)
investigated the design and implementation of a remote data collection and
monitoring system. The system communication is based on GSM short messages from
cell phones using Siemens cell phone module TC35. The serial interface of TC35 is
directly connected to the serial interface of PC computer. The system hardware

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
24
includes remote client monitoring hardware, central monitoring module, and 0809
A/D converter. The central monitoring module sends commands via channel
1. Data collection commands are sent out through TC35 to collect all sorts of
data. After data are collected they are processed by remote clients and sent
back to the central monitoring module by GSM short messages via channel
2. Each monitoring module can connect up to 128 sensors and equipments
within the range of 1000 meters via RS485 interface.
The server hardware consists of 8031 microprocessor, 74LS373, one 8 kB 2764
E2PROM, one 2 kB 6116 extended memory, and one 8155 programmable serial
interface chip. One 4×4 keyboard is connected to the PI port and 8 LED displays are
connected to PA and PB ports of 8155. According (Khiyal et al., 2009) proposed SMS
based system for controlling of home appliances remotely and providing security
when the user is away from the place. Home appliance control system (HACS)
consists of PC which contains the software components through which the appliances
are controlled and home security is monitored and GSM Modem that allows the
capability to send and receive SMS to and from the system. The communication with
the system takes place via RS232 serial port.

2.1.5 Remote Monitoring using Wireless Sensor Networks (WSN), Bluetooth,


WiFi, Zigbee technologies:
Many Wireless Technologies like RF, Wi-Fi, Bluetooth and Zigbee have been
developed and remote monitoring systems using these technologies are popular due to
flexibility, low operating charges, etc. Today Wireless Sensor Network are used into
an increasing number of commercial solutions, aimed at implementing distributed
monitoring and control system in a great number of different application areas.
According to (Wijetunge et al., 2008) designed a general purpose controlling module
designed with the capability of controlling and sensing up to five devices
simultaneously. The communication between the controlling module and the remote
server is done using Bluetooth technology. The server can communicate with many
such modules simultaneously. The controller is based on ATMega64 microcontroller
and Bluetooth communication TDK Blu2i (Class 1) module which provides a serial
interface for data communication. The designed controller was deployed in a home
automation application for a selected set of electrical appliances. (Kanma et al., 2003)
proposed a home appliance control system over Bluetooth with a cellular phone,

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
25
which enables remote-control, fault-diagnosis and software-update for home
appliances through Java applications on a cellular phone. The system consists of
home appliances, a cellular phone and Bluetooth communication adapters for the
appliances. The communication adapter hardware consists of a 20MHz 16bit CPU,
SRAM and a Bluetooth module. The communication adapter board is connected to
the home appliance and to the cellular phone through serial ports. The appliances can
communicate with the cellular phone control terminal via Bluetooth SPP. (Sung-Nien
Yu and Jen-Chieh Cheng, 2005) proposed a wireless patient monitoring system which
integrates Bluetooth and WiFi wireless technologies. The system consists of the
mobile unit, which is set up on the patient’s side to acquire the patient’s physiological
signals, and the monitor units, which enable the medical personnel to monitor the
patient’s status remotely. The mobile unit is based on AT89C51 microprocessor. The
digitized vital-sign signals are transmitted to the local monitor unit using a Bluetooth
dongle. Four kinds of monitor units, namely, local monitor unit, a control center,
mobile devices (personal digital assistant; PDA), and a web page were designed to
communicate via the WiFi wireless technology. (Flammini et al., 2007) suggested a
novel architecture for environmental tele-monitoring that relies on GSM for sampling
point delocalization, while on-field nodes implement local subnets based on the
DECT technology. Local subnets contain two major blocks; Acquisition Station (AS)
where sensors and actuators are located and Transmitting Module (TM), i.e., the
module that handles several measurement stations and sends data to the control center
(CC). Each AS acts as a data logger, storing in its internal memory device field data;
communications between AS and TM are cyclic (round robin), with a cycle time of
about 1–10 min. On the contrary communications between TM and CC occur once a
day for data-logging purposes, while alarms or threshold crossings are communicated
asynchronously by means of Short Message Service (SMS). Prototypes have been
realized to interface with temperature (T, AD590 from analog devices), humidity
(RH, HumirelHM1500), and carbon monoxide (CO, Figaro TGS2442) sensors. DECT
Siemens module MD32 and GSM module MC35 were used. AS was based on
Microchip's PIC18F452 microcontroller and TM was designed using 32-bit ARM-
based microcontroller from Samsung (S3F441FX). (Yunseop Kim et al., 2008)
described details of the design and instrumentation of variable rate irrigation, a
wireless sensor network, and software for real-time in-field sensing and control of a

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
26
site-specific precision linear-move irrigation system. Field conditions were site-
specifically monitored by six in-field sensor stations distributed across the field based
on a soil property map, and periodically sampled and wirelessly transmitted to a base
station. An irrigation machine was converted to be electronically controlled by a
programming logic controller (Siemens S7-226 with three relay expansion modules
activated electric over air solenoids to control 30 banks of sprinklers) that updates
geo-referenced location of sprinklers from a differential Global Positioning System
(GPS) (17HVS, Garmin) and wirelessly communicates with a computer at the base
station. Communication signals from the sensor network and irrigation controller to
the base station were successfully interfaced using low-cost Bluetooth wireless radio
communication through Bluetooth RS-232 serial adaptor (SD202, Initium Company).
(Bencini et al., 2009) developed state of the art WSN based system for monitoring a
series of physiological parameters in the vineyard to prevent plant vine diseases. The
different soil moistures in the same field is used to decide the correct amount of water
for irrigation; sandy soils have very different behavior to irrigation in respect to
clayey ones; water retention capacity is completely different and measuring it exactly
where it is needed can help in controlling the irrigation system and saving water.
Monitoring air temperature and humidity in different parts of a vine can help in
preventing and fighting plants diseases, reducing the amount of pesticides only when
and where they are necessary. Each node consists of MIDRA mote is equipped with
868 MHz radio transceiver, Chipcon CC1000TM. The master node of the Wireless
Sensor Network is connected to a GPRS gateway board, forwarding data to a remote
server, using the TCP-IP standard protocol. It included 11 nodes with a total of 35
sensors distributed on 1 hectare area; monitor common parameter using simple,
unobtrusive, commercial and cheap sensors, forwarding their measurements by the
means of a heterogeneous infrastructure, consisting of WSN technology, GPRS
communication and ordinary Internet data transfer (TCP-IP protocol). Data coming
from sensors are stored in a database that can be queried by users everywhere in
world, only using a laptop or a PDA: the Smart User Interface also allows to read and
to analyze data in an easy way. (Harms et al., 2010) describe the emerging wireless
sensor networks (WSN) for autonomous Structural Health monitoring SHM systems
for bridges. In SmartBrick Network, the base station and sensor nodes collect data
from the onboard and external sensors. The sensor nodes communicate their data from

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
27
quasi-static sensors, e.g., temperature sensors, strain gauges and seismic detectors to
the base station over the ZigBee connection. The base station processes these data and
communicates them, along with any alerts generated, to a number of destinations over
the GSM/GPRS link provided by the cellular phone infrastructure. The data are
reported by email and FTP to redundant servers, via the Internet, at regular intervals
or on an event-triggered basis. The alerts are sent directly by SMS text messaging and
by email. Wireless sensor networks are the key enabler of the most reliable and
durable systems for long-term SHM and have the potential to dramatically increase
public safety by providing early warning of impending structural hazards. (Mulyadi et
al., 2009) implemented a wireless medical interface based on ZigBee and Bluetooth
technology. The purpose is to acquire, process, and transfer raw data from medical
devices to Bluetooth network. The Bluetooth network can be connected to PC or PDA
for further processing. The interface comprises two types of device: MDIZ and
MDIZB. MDIZ acquires data from medical device, processes them using
microcontroller, and transmit the data through ZigBee network through UART.
MDIZB receives data from several MDIZs and transmit them out to PC through
Bluetooth network. MDIZB comprises of ZigBee module, two processors, RAM, and
Bluetooth module. It receives data from ZigBee network through its ZigBee module.
The data are then sent to processor 1. Processor 1 decides priority of MDIZs. In
processor 1, the data frame is added with Start byte and End byte to mark the
beginning and the end of data frame. After being processed in processor 1, the data
are then sent to processor 2 through SPI (Serial Peripheral Interface). Processor 2
transmits data to PC through Bluetooth network. Processor 2 controls Bluetooth
module. It also receives commands given by PC through Bluetooth network. The
interface is connected with four different medical devices through UART and analog
port at 42 kbps of data rate.

2.1.6 Socket Programming with Android


2.1.6.1 Client/Server Communication
At a basic level, network-based systems consist of a server, client, and a media for
communication as shown A computer running a program that makes a request for
services is called client machine. A computer running a program that offers requested

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
28
services from one or more clients is called server machine. The media for
communication can be wired or wireless network.

Figure 2.3 Client / Server Communication

Figure 2.4 Bluetooth Stack Layer


Generally, programs running on client machines make requests to a program (often
called as server program) running on a server machine. They involve networking
services provided by the transport layer, which is part of the Internet software stack,
often called TCP/IP (Transport Control Protocol/Internet Protocol) stack Figure 2.4.
The transport layer comprises two types of protocols, TCP (Transport Control
Protocol) and UDP (User Datagram Protocol). The most widely used programming
interfaces for these protocols are sockets. TCP is a connection-oriented protocol that
provides a reliable flow of data between two computers. Example applications that
use such services are HTTP, FTP, and Telnet. UDP is a protocol that sends
independent packets of data, called datagram, from one computer to another with no
guarantees about arrival and sequencing. Example applications that use such services
include Clock server and Ping. The TCP and UDP protocols use ports to map
incoming data to a particular process running on a computer. Port is represented by a

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
29
positive (16-bit) integer value. Some ports have been reserved to support
common/well known services:
Σ ftp 21/tcp
Σ telnet 23/tcp
Σ smtp 25/tcp
Σ login 513/tcp
Σ http 80/tcp,udp
Σ https 443/tcp,udp
User-level process/services generally use port number value >= 1024.

2.1.6.2 Hosts Identification and Service Ports


Every computer on the Internet is identified by a unique, 4-byte IP address. This is
typically written in dotted quad format like 128.250.25.158 where each byte is an
unsigned value between 0 and 255. This representation is clearly not user-friendly
because it does not tell us anything about the content and then it is difficult to
remember. Hence, IP addresses are mapped to names like www.buyya.com or
www.google.com,which are easier to remember. Internet supports name servers that
translate these names to IP addresses. In general, each computer only has one Internet
address. However, computers often need to communicate and provide more than one
type of service or to talk to multiple hosts/computers at a time. For example, there
may be multiple ftp sessions, web connections, and chat programs all running at the
same time. To distinguish these services, a concept of port s, a logical access point,
represented by a 16-bit integer number is used. That means, each service offered by a
computer is uniquely identified by a port number. Each Internet packet contains both
the destination host address and the port number on that host to which the
message/request has to be delivered. The host computer dispatches the packets it
receives to programs by looking at the port numbers specified within the packets. That
is, IP address can be thought of as a house address when a letter is sent via post/snail
mail and port number as the name of a specific individual to whom the letter has to be
delivered.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
30
2.1.6.3 Sockets and Socket-based Communication
Sockets provide an interface for programming networks at the transport layer.
Network communication using Sockets is very much similar to performing file I/O. In
fact, socket handle is treated like file handle. The streams used in file I/O operation
are also applicable to socket-based I/O. Socket-based communication is independent
of a programming language used for implementing it. That means, a socket program
written in Java language can communicate to a program written in non-Java (say C or
C++) socket program. A server (program) runs on a specific computer and has a
socket that is bound to a specific port. The
server listens to the socket for a client to make a connection requested. If everything
goes well, the server accepts the connection. Upon acceptance, the server gets a new
socket bound to a different port. It needs a new socket (consequently a different port
number) so that it can continue to listen to the original socket for connection requests
while serving the connected client.

Figure 2.5 Establishment of path for two-way communication between client and
server.

2.1.6.4 Tcp/Ip Socket Programming


The two key classes from the java.net package used in creation of server and client
programs are: Server Socket, Client Socket
A server program creates a specific type of socket that is used to listen for client
requests (server socket), In the case of a connection request, the program creates a
new socket through which it will exchange data with the client using input and output
streams. The socket abstraction is very similar to the fi le concept: developers have to

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
31
open a socket, perform I/O, and close it. Figure 13.5 illustrates key steps involved in
creating socket-based server and client programs.

Figure 2.6 Socket based client and server

2.2 Empirical Framework


The Android platform support for the Bluetooth network stack. It allows a device to
wirelessly exchange data with other Bluetooth devices. The new vitality to the mobile
space has injected because of the release of Android smart platform. Android is an
operating system based on Linux kernel. It is designed for the touch screen mobile
devices. The user interface of Android is based on direct manipulation. The Android
system provides many Bluetooth APIs for developers to call. Bluetooth technology
allows users to exchange voice and data transmission between two or more devices. It
is basically a wireless communication technology. Bluetooth technology is reflected
in the low price, easy to control and non-visual
Distance limitations. Bluetooth is integrated into the android platform as an android
mobile network communication module. BlueZ is used to connect the Android phones
into a local area network. It helps to communicate with each other. Bluetooth does not
need a license around the globe for the working frequency band. In the connection
initialization phase, firstly, it starts the application and searches the Bluetooth devices.
Second, it sends the signals to the server class. After this it can run, pause and stop the
application. Third, it shows alert using set Alert function on every changing. Server
goes active and sends the signals to other devices. Client class works to respond the
Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
32
other Bluetooth device server. This allows a two-way chat over Bluetooth. No GSM
or Wi-Fi connection required. In addition to the person-to-person chat, chat rooms can
be used to gather more than two persons at a time.

2.2.1 Process of Bluetooth Chat Application


It first checks whether the Bluetooth of the devices is in ON/OFF mode. . If the
Bluetooth of the devices is in OFF mode then it makes the request to enable the
Bluetooth. Perform scanning of the devices which are in their range. Display the list
of all the devices in the range. Select the device with which one wants to do the chat.
If the device connects then set up the chat.

2.2.2 Designed Bluetooth Communication


User interface is divided into 4 parts:
a) Requesting Connection: This user interface is on the client side that sends a request
to the other device (server) for setting up a chat session.
b) Communication: This is common to both the client and the server. This is where
both the devices chat and exchange information.
c) Disabling Session: Any of the two devices can ask terminate the session.
d) Sync: The messages sent between the two devices can be stored as well as the
Previous history of messages can be synced from the device itself.

2.2.3 Bluetooth API: Android Bluetooth


It provides classes that manage Bluetooth functionality, such as scanning for devices,
connecting with devices, and managing data transfer between devices. The Bluetooth
APIs let applications: Scan for other Bluetooth devices (including BLE [BT Low
Energy] devices) Query the local Bluetooth adapter for paired Bluetooth devices.
Establish RFCOMM [Radio Frequency Communication] channels/sockets. Connect to
specified sockets on other devices. Transfer data to and from other devices.
Communicate with BLE devices, such as proximity sensors, heart rate monitors,
fitness devices, and so on.

2.2.4 Algorithm (Requesting Device Client)


1. Launches Bluetooth Messenger.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
33
2. Inputs its name.
3. Chooses to be connected to a Device.
4. Chooses not to be in Listen Mode.
5. Selects the device it wants to chat with
from ‘List of nearby Bluetooth Devices’.
6. Sends its own identity from udetails.txt on
server phone’s request.
7. Receives server’s identity.
8. Inputs and exchanges Messages.
9. All messages exchanged gets stored in
‘chat.txt’.

2.2.5 Algorithm Requested Device (Server)


1. Launches Bluetooth Messenger.
2. Inputs its name.
3. Chooses to be connected to a Device.
4. Chooses to be in Listen Mode and waits.
5. When a client tries to connect it asks for identity.
6. Receives client identity and saves it.
7. Sends its identity to client.
8. Inputs and exchanges Messages.
9. All messages exchanged get stored in ‘chat.txt’.

2.2.6 Roster (Android Storage/Backup)


1. Server remains in Bluetooth Accept mode.
2. User sends a message saying ‘sync’ followed by contents of its chat.txt with
its name from udetails.txt.
3. Server receives the sync message and stores all the contents that follow.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
34
CHAPTER THREE
RESEARCH METHODOLOGY, SYSTEM INVESTIGATION AND
ANALYSIS

3.0 Research Methodology


The process used to collect information and data for the purpose of making business
decisions. The methodology may include publication research, interviews, surveys
and other research techniques, and could include both present and historical
information.

Research is the systematical design, collection analysis and reporting of data findings
relevant to a specific situation facing the organization. The sample of the, the
volatility and administration and method of data analysis employed.

Research according to Olalian and Nwoke (2007) is the process of arriving at


dependable solution to problem. The planned and systematic collection, analysis and
interpretation of data. Aluiulo (2008) defined research as a systematic and objective
research for new knowledge of the objective of the study and or application of a novel
problem.

Therefore, research methodology is the structure approach of aiming at dependable


solution to a problem through planned and systematic collection, analysis and
interpretation of data. Research methodology in this case encompasses system
investigation, analysis and sources of data.

Research methodology is a study which is obtained to know how the old system
worked so that relevant facts will be obtained in order to design the proposed system.
It also gives a detailed description of what the researchers planned and procedures
adopted towards getting or obtaining relevant fact (data). It is the description of
subject’s instrument, design, procedure, assumption and limitation. The description of
subjects includes a determination and description of the population from which the
samples were selected and the description of the method used in selecting the sample
or samples.

In the Stanley Milgram(2014) Experiment, the null hypothesis was that the
personality determined whether a person would hurt another person, while the

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
35
research hypothesis was that the role, instructions and orders were much more
important in determining whether people would hurt others.

Figure 3.0 Research Methodology Processes

3.0.1 System Development Life Cycle


The systems development life cycle (SDLC), also referred to as the application
development life-cycle, is a term used in systems engineering, information systems
and software engineering to describe a process for planning, creating, testing, and
deploying an information system.

Figure 3.1 System Development Life Cycle


Software development life cycle explains the stages and processes it takes to develop
software from its inception. The cycle to take depends on the tools available and the

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
36
time and expertise of the developers. So many models are used which involves
different stages and processes in software development, the models include:
 Waterfall model
 Iterative Model
 Fountain
 Spiral Build and Fix
 Rapid Prototyping
 Incremental
 Synchronize
 Stabilized

3.0.1.1 Iterative Model


In Iterative model, iterative process starts with a simple implementation of a small set
of the software requirements and iteratively enhances the evolving versions until the
complete system is implemented and ready to be deployed. An iterative life cycle
model does not attempt to start with a full specification of requirements. Instead,
development begins by specifying and implementing just part of the software, which
is then reviewed in order to identify further requirements. This process is then
repeated, producing a new version of the software at the end of each iteration of the
model.

Iterative Model design


Iterative process starts with a simple implementation of a subset of the software
requirements and iteratively enhances the evolving versions until the full system is
implemented. At each iteration, design modifications are made and new functional
capabilities are added. The basic idea behind this method is to develop a system
through repeated cycles (iterative) and in smaller portions at a time (incremental).

Iterative Model Application


Like other SDLC models, Iterative and incremental development has some specific
applications in the software industry. This model is most often used in the following
scenarios:

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
37
Requirements of the complete system are clearly defined and understood.
Major requirements must be defined; however, some functionalities or requested
enhancements may evolve with time.
There is a time to the market constraint.
A new technology is being used and is being learnt by the development team while
working on the project.
Resources with needed skill set are not available and are planned to be used on
contract basis for specific iterations.
There are some high risk features and goals which may change in the future.

Figure 3.2 Iterative Design

Iterative and Incremental development is a combination of both iterative design or


iterative method and incremental build model for development. "During software
development, more than one iteration of the software development cycle may be in
progress at the same time." and "This process may be described as an "evolutionary
acquisition" or "incremental build" approach."
In incremental model the whole requirement is divided into various builds. During
each iteration, the development module goes through the requirements, design,
implementation and testing phases. Each subsequent release of the module adds
function to the previous release. The process continues till the complete system is
ready as per the requirement. The key to successful use of an iterative software
development lifecycle is rigorous validation of requirements, and verification &

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
38
testing of each version of the software against those requirements within each cycle of
the model. As the software evolves through successive cycles, tests have to be
repeated and extended to verify each version of the software.

3.1 Method of Data Collection Used


Data Collection is an important aspect of any type of research study. Inaccurate data
collection can impact the results of a study and ultimately lead to invalid results. Data
collection methods for impact evaluation vary along a continuum. At the one end of
this continuum are quantitative methods and at the other end of the continuum are
Qualitative methods for data collection. This section of this research work describes
the various method employed in the process of data collection. For every data
collection, the best practices identify data collection by characteristics of each
method. There are so many methods of collecting data needed for analysis; the choice
of a method is dependent on the nature of the data to be collected. The data to be
collected may be qualitative or quantitative.
Data can be collected from primary or secondary sources:
 Primary: primary data are first hand information gotten by the researcher, this
can be done using the following methods:
 Interview
 Observation
 Experiment
 Questionnaire
 Etc
 Secondary: This is when data is collected from already existing sources which
include:
 Textbooks
 Periodic journals
 Articles.
 Internet.
The method used for data collection in this research work is mainly Secondary source
of data collection and Interview and group discussion was also used to source for
information which after all data collection and little analysis the demand for the new
system is great importance (90% out the interview and group discussion supported the

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
39
new system development). According to American heritage Dictionary (2011), a
questionnaire is a form containing a set of questions, especially one addressed to a
statistically significant number of subjects as a way of gathering information for a
survey.
According to Collins English Dictionary (2003), pointed out that it is a set of
questions on a form, submitted to a number of people in order to collect statistical
information. Below is the sample of the questionnaire used.
Questionnaire is a research instrument consisting of a series of questions and other
prompts for the purpose of gathering information from respondents. Although they are
often designed for statistical analysis of the responses, this is not always the case. The
questionnaire was invented by the Statistical Society of London in 1838.
According to Gault RH (1907), questionnaires have advantages over some other
types of surveys in that they are cheap, do not require as much effort from the
questioner as verbal or telephone surveys, and often have standardized answers that
make it simple to compile data. However, such standardized answers may frustrate
users. Questionnaires are also sharply limited by the fact that respondents must be
able to read the questions and respond to them. Thus, for some demographic groups
conducting a survey by questionnaire may not be concrete. As a type of survey,
questionnaires also have many of the same problems relating to question construction
and wording that exist in other types of opinion polls.

Interview Method
In a structured interview, the researcher asks a standard set of questions and nothing
more.(Leedy and Ormrod, 2001)

Face -to -face interviews: have a distinct advantage of enabling the researcher to
establish rapport with potential participants and there for gain their cooperation. These
interviews yield highest response rates in survey research. They also allow the
researcher to clarify ambiguous answers and when appropriate, seek follow-up
information. Disadvantages include impractical when large samples are involved time
consuming and expensive.(Leedy and Ormrod, 2001)
Telephone interviews: are less time consuming and less expensive and the researcher
has ready access to anyone on the planet who has a telephone. Disadvantages are that

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
40
the response rate is not as high as the face-to- face interview as but considerably
higher than the mailed questionnaire. The sample may be biased to the extent that
people without phones are part of the population about whom the researcher wants to
draw inferences.

Computer Assisted Personal Interviewing (CAPI): is a form of personal


interviewing, but instead of completing a questionnaire, the interviewer brings along a
laptop or hand-held computer to enter the information directly into the database. This
method saves time involved in processing the data, as well as saving the interviewer
from carrying around hundreds of questionnaires. However, this type of data
collection method can be expensive to set up and requires that interviewers have
computer and typing skills.

Questionnaire
Paper-pencil-questionnaires: can be sent to a large number of people and saves the
researcher time and money. People are more truthful while responding to the
questionnaires regarding controversial issues in particular due to the fact that their
responses are anonymous. But they also have drawbacks. Majority of the people who
receive questionnaires don't return them and those who do might not be representative
of the originally selected sample.(Leedy and Ormrod, 2001)
Web based questionnaires: A new and inevitably growing methodology is the use of
Internet based research. This would mean receiving an e-mail on which you would
click on an address that would take you to a secure web-site to fill in a questionnaire.
This type of research is often quicker and less detailed. Some disadvantages of this
method include the exclusion of people who do not have a computer or are unable to
access a computer. Also the validity of such surveys are in question as people might
be in a hurry to complete it and so might not give accurate responses.
Questionnaires often make use of Checklist and rating scales. These devices help
simplify and quantify people's behaviors and attitudes. A checklist is a list of
behaviors, characteristics, or other entities that the researcher is looking for. Either the
researcher or survey participant simply checks whether each item on the list is
observed, present or true or vice versa. A rating scale is more useful when a behavior

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
41
needs to be evaluated on a continuum. They are also known as Likert scales. (Leedy
and Ormrod, 2001).

3.2 System Investigation


In order to reach this stage in the System Life Cycle, management would have
listened to the alternative solutions presented by the system analyst and have decided
to either commission a brand new IT system or have changes made to their current
system. During the earlier 'definition' phase the analysis looked superficially at the
current system and the potential benefits of a new system. During this 'investigation
and analysis' phase they will carry out very detailed investigations in order to fully
understand the current system and the proposed new system.
The reasons for performing system investigation in this work include:
 Determining the scope of the project, by evaluating the complexity of the
problem and the effort required to complete it.
 Determining the better way of information transfer with low energy
consumption, little or no charge and the use of better preferred technology
available in different device.
 Determining lower cost wireless device connectivity. Open standard short-
range wireless communication. Bluetooth offers higher level service profiles,
such as FTP-like file servers, voice transport.
 Subscribing for internet connection and internet facilities (device) which has
economic feasibility issues

The relationship between proposed system and the existing system:

 Data exchange (text): at little or no charge (data bundle subscription). Like


whatsup android application used as social media of data exchange (text) or
Text processing application requires internet connection subscription.
 Lower power consumption: Bluetooth technology consumes little or no when
text files are exchanged
 Profiling: Bluetooth offers higher level service profiles, such as FTP-like file
servers, voice transport.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
42
3.3 System Analysis
The act, process, or profession of studying an activity (as a procedure, a business, or a
physiological function) typically by mathematical means in order to define its goals or
purposes and to discover operations and procedures for accomplishing them most
efficiently. System analysis is a process of gathering and interpreting facts,
diagnosing problems and the information to recommend improvements on the system.
It is a problem solving activity that requires intensive communication between the
system users and system developers. System analysis or study is an important phase
of any system development process.
System analysis is a problem solving technique that decomposes a system into its
component pieces for the purpose of the studying how well those component parts
work and interact to accomplish their purposes According to (Lonnie D. Bentley,
2007).

The analysis phase involves gathering requirements for the system. At this stage,
business needs are studied with the intention of making business processes more
efficient. The system analysis phase focuses on what the system will do in an effort
that views all stakeholders, as viable sources of information. In the analysis phase, a
significant amount of time is spent talking with stakeholders and reviewing the
stakeholder’s input. Common stakeholders for IT projects are:
 Architecture office
 Testing & certification office
 Records management team
 Application support group
Once stakeholders have been recognized, the gathering and analysis of the
requirements can begin. Requirement gathering must be related to business needs or
opportunities. Requirement analysis involves capturing requirements and analyzing
requirements. Capturing requirements is communicating with stakeholders to agree on
what the requirements are. Analyzing requirements is using standard tools to produce
a baseline of the requirements. Once the stakeholders concur on the requirements, the
baseline is created and becomes the formal requirement source.
Within this analysis phase, the analyst is discovering and fact finding. Along with
meeting with stakeholders, the analyst must meet with end users to understand what

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
43
the user's needs are and to learn about problems that affect the current system in order
to assist with designing a new and more efficient system. There are several activities
that must occur within the analysis phase:
 Gather Information
 Define the new system's requirements
 Build prototypes for the new system
 Prioritize requirements
 Evaluate alternatives
 Meet with management to discuss new options
3.3.1 Input Analysis
This section explains the analysis of data entered into the computer system i.e is data-
type, data format and the length of data. The input analysis has to do with data format
(i.e Data-types). The format could be String, Integer and double etc. e.g forgiven input
and structure input analysis.
3.3.2 Output Analysis
After processing data / information the data are outputted from the computer to the
user to hardcopy form or softcopy form. The format at which the data is to be
outputted is structured format etc.
3.3.3 Data Analysis
The data-type the system implements in processing and inputting to the computer
system. The data-type is referred to chapter four in input design, describing the data
output format and data input format.

3.3.1 Overview of the Existing System


This application allows two Android devices to carry out two-way text chat over
Bluetooth. It demonstrates all the fundamental Bluetooth API capabilities, such as: (1)
Scanning for other Bluetooth devices (2) Querying the local Bluetooth adapter for
paired Bluetooth devices (3) Establishing RFCOMM channels/sockets (4) Connecting
to a remote device (5) Transferring data over Bluetooth.
Or
The Android platform includes support for the Bluetooth network stack, which allows
a device to wirelessly exchange data with other Bluetooth devices. The application
framework provides access to the Bluetooth functionality through the Android

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
44
Bluetooth APIs. These APIs let applications wirelessly connect to other Bluetooth
devices, enabling point-to-point and multipoint wireless features.
Using the Bluetooth APIs, an Android application can perform the following:
 Scan for other Bluetooth devices
 Query the local Bluetooth adapter for paired Bluetooth devices
 Establish RFCOMM channels
 Connect to other devices through service discovery
 Transfer data to and from other devices
 Manage multiple connections
This document describes how to use Classic Bluetooth. Classic Bluetooth is the right
choice for more battery-intensive operations such as streaming and communicating
between Android devices. For Bluetooth devices with low power requirements,
Android 4.3 (API Level 18) introduces API support for Bluetooth Low Energy. To
learn more, see Bluetooth Low Energy.

Problems Associated with the Existing System


The existing system actually performs data exchange at high rate of charges and
power consumption. This system uses internet connection facilities before text files
are exchange. Before facilities could be ready for use i.e (Wi-Fi Router, Internet LNB
and etc) huge amount of money has been spend. Some problems have been
encountered in the existing system which prompted for the research work to develop
an automated system that will be able to bring solutions to the problems as
encountered in the existing system. The problems are;
1. High Charges on data change
2. High power consumption
3. Uses internet connection facilities
4. High cost of facilities and extension facilities

3.3.2 Proposed System


This project research work focus on development of real-time chatting android
application for data exchange (Text) in a real-time process. The real-time chatting
application will Scan for other Bluetooth devices, Query the local Bluetooth adapter
for paired Bluetooth devices, Establish RFCOMM channels, Connect to other devices

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
45
through service discovery, data exchange through socket from other devices and lastly
manage multiple connections. The real-time socket chatting processes can take place
under a peer to peer topology using Bluetooth communication channels.

3.3.3 Feasibility Analysis


Feasibility Analysis is an assessment of the practicality of a proposed project. A
feasibility Analysis is performed by a company or undertaking a project or research
when they want to know whether a project is possible given certain circumstances.
Feasibility studies or Analysis are undertaken under many circumstances; to find out
whether a company or individual has enough money for a project, to find out whether
the product being created will sell, or to see if there are enough human show the
strengths and deficits before the project is planned or budgeted for. By doing the
research beforehand, companies can save money and resources in the long run by
avoiding projects that are not feasible.

Major Feasibility Study Examples:


3.3.3.1 Operational Feasibility
The proposed project “Bluetooth Chat Application (Android)” is best fitted for no
cost/charges chatting. Any other chatting application can use this application easy and
short distance conversation and communicate with other devices at ease with little or
no stress involved.

3.3.3.2 Technical Feasibility


This application was developed using Android Studio IDE which is best technology
suited for this mobile application. It is relatively easy to use programming language
and has built in functionalities that made the development process a lot easier when
compared to other languages. The back end was developed using Sqlite database
which was connected with Sqlite connector. The editor highlighted some common
coding errors which would not have been detected until the client start using the
application, hence it was that helpful.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
46
Figure 1.2 Device Connections and Data Exchange

3.3.4 Data Flow Diagram (DFD)

The device A scan for another device with the range of Bluetooth discovery and when
Device B is discovered and Pairing Operation is performed by the use of the Mac
address and Device Name. After complete pairing processes the date exchange
process engage into action. Then the two devices can now exchange data (text)
between device and device B.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
47
CHAPTER FOUR
SYSTEM DESIGN AND IMPLEMENTION

4.0 Overview of System Design


The overview of the system design explains the entire functionality and operability of
the system. The system was design and implemented using the android framework
Integrated Development Environment with some other development language like
Java for Backend, XML for frontend and some static files. These applications after
compilation are tested using a mobile phone or emulator running with Android
operating system.

This application consist of four major module; The Scanning, Identification, pairing
and Data Exchange modules. The scanning module performs a scan and locates other
devices within the range of connectivity and the scanning device identifies other
device and prepare for pairing with a unique identifiers like numeric key or
asymmetric data connection process then the data exchange processes is initialized.

The technology for data communication process is the Bluetooth Technology having
advantage over some other medium like internet and wifi hotspot like cost and low
powered communication medium.

4.1 Input forms Design


Input forms fields are what allow your users to fill in your form. Depending on what
information you ask, there are various types of field’s   text fields, password fields,
dropdowns, check boxes, radio buttons, date pickers and others. All these are design
using paper and pencil i.e having a paper prototyping and the actual system. In this
section the Variable names, Data-Type and the Variable length required for each input
field displayed. Methods for preparing input validations and steps to follow when
error occur. OBJECTIVES 1. Input Design is the process of converting a user-
oriented description of the input into a computer-based system

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
48
Table 1 General Input Format
Variable Name Data-type Variable Length
Register Input format
Bluetooth Device String 20
Login Input Format
Bluetooth Device String 20
Chat Input Format
Message String 30

4.2 Process Design


This section describes the different stages involved on during the creation of the
online market survey and reporting system. The activity determines the workflow,
equipment needs, and implementation requirements for a particular process. Process
design typically uses a number of tools including flowcharting, process simulation
software, and scale models. Read more:
http://www.businessdictionary.com/definition/process-design.html

Figure 4.2 Process Stages

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
49
4.2.1 System Flowchart
A flowchart is a type of diagram that uses an algorithm, workflow or process,
showing the steps as boxes of various kinds, and their order by connecting them with
arrows. This diagrammatic representation illustrates a solution model to a given
problem. Flowcharts are used in analyzing, designing, documenting or managing a
process or program in various fields.

Figure 4.2 System Flowchart

4.3 Output Design

In the data dictionary, each data flow is defined by a data structure of data elements.
The input data flow from the external entities and the output data flow to the external
entities are also defined in the data dictionary. These two data dictionaries are used to
design data-entry inputs and reports or screens of the system.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
50
Figure 4.3.1 Splash Screen page

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
51
Figure 4.3.2 Login Screen Page

Figure 4.3.3 Bluetooth Chat Page

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
52
Figure 4.3.4 Activity Log
4.4 Database Design
Database design is the process of producing a detailed data model of database. This
data model contains all the needed logical and physical design choices and physical
storage parameters needed to generate a design in a data definition language, which
can then be used to create a database. The process of doing database design generally
consists of a number of steps which will be carried out by the database designer.
Usually, the designer must:
 Determine the data to be stored in the database.
 Determine the relationships between the different data elements.
 Superimpose a logical structure upon the data on the basis of these
relationships.

Figure 4.4.1 Database Design Process


4.5 Program Design
Program Design is the process responsible for the overall design of an internet or
interactive project. Relying on a broad base of visual, media and computing skills, the
program design shapes the project's look and functionality from initial stages to
completed project. Unlike the project manager, who has broad budget and scheduling
responsibility, the program design is the artistic and functional direction, and
therefore relays plans and specifications to the visual designers, interface designers,
developers and project manager in order to construct the program. Similar to an
information architect, the program designer does not necessarily dwell in the domain
of information per se, but also may venture into instructional design, application
design, and the overall design direction of those types of projects.
4.6 System Implementation
Systems implementation is the construction of the new system and the delivery of that
system into production (that is, the day-to-day business or organization operation).
Process of:
1. defining how the information system should be built (i.e physical system
design),
2. ensuring that the information system is operational and used,
3. ensuring that the information system meets quality standard (i.e quality
assurance).

Systems design

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
53
Conceptual design – what the system should do
Logical design – what the system should look to the user
Physical design – how the system should be built

Physical system design using structured design approach: To produce a system


that is easy to read, code, and maintain
1. Factoring: decomposition
2. Span of control: 9 subordinate modules
3. Reasonable size: 50-100 LOC
4. Coupling: minimize inter-module dependency
5. Cohesion: single module functionality
6. Shared use: multiple calls to lower level modules from different bosses

Structured design tools

 Organization of programs and program modules (structure chart)


 processing logic specification in each module (pseudocode)

Structure chart – to show graphically

1. how the various program parts/modules of an information system are


physically organized hierarchically
2. how the modules communicate with each other through data couple (data
exchange) and flag (control/message)
3. how the modules are related to each other in terms of sequence, selection, and
repetition

4.7 Project Costing

Project Costing is a method that uses technology to measure cost and productivity
through the full life cycle of enterprise level projects.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
54
PCM encompasses several specific functions of project management including
estimating, job controls, field data collection, scheduling, accounting and design.
PCM main goal is to complete a project within an approved budget

Beginning with estimating, a vital tool in PCM, actual historical data is used to
accurately plan all aspects of the project. As the project continues, job control uses
data from the estimate with the information reported from the field to measure the
cost and production in the project. From project initiation to completion, project cost
management has an objective to simplify and cheapen the project experience.

This technological approach has been a big challenger to the mainstream estimating
software and project management industries.

Project Cost Management is one of the ten Knowledge Areas outlined in the A Guide
to the Project Management Body of Knowledge (aka the PMBOK Guide). It is used
during the Planning and Monitoring & Controlling Process Groups.

There are 4 processes in this knowledge area including

1. Planning Cost Management


2. Estimating Costs
3. Determining Budget
4. Controlling Cost

In a world of limited funds, as a project manager you're constantly deciding how to


get the most return for your investment. The more accurate your estimate of project
cost is, the better able you will be to manage your project’s budget. Therefore,
estimating a project’s costs is important for several reasons:

 It enables you to weigh anticipated benefits against anticipated costs to see


whether the project makes sense.
 It allows you to see whether the necessary funds are available to support the
project.
 It serves as a guideline to help ensure that you have sufficient funds to
complete the project.

This research work was development with enterprise Android framework Integrated
Development Environment; the software was purchased $250,000 (pyCharm 2016)
and some other open source libraries and frameworks like Jquary, Bootstrap 3.4. The
Hardware component used HP 635 purchased at the rate $4000.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
55
CHAPTER FIVE
RECOMMENDATIONS AND CONCLUSION

5.0 Summary
The summary of this research work: The system was design and implemented using
the android framework Integrated Development Environment with some other
development language like Java for Backend, XML for frontend and some static files.
These applications after compilation are tested using a mobile phone or emulator
running with Android operating system. This application consist of four major
module; The Scanning, Identification, pairing and Data Exchange modules. The
scanning module performs a scan and locates other devices within the range of
connectivity and the scanning device identifies other device and prepare for pairing
with a unique identifiers like numeric key or asymmetric data connection process then
the data exchange processes is initialized. The technology for data communication
process is the Bluetooth Technology having advantage over some other medium like
internet and wifi hotspot like cost and low powered communication medium.

5.1 Recommendations
This research work revealed a communication system that is cheap and affordable.
This system is also operational with low power consumption at a limited distant. This
system is recommended to be used by an organization trying to achieve intranet safe
and lower cost communication platform.

5.2 Conclusion
The system is ready to be used by any device available with enable Bluetooth
technology and the android Bluetooth chat app. It runs under an android operating
system platform as the host engine or machine. The can be functional with a lower
powered mobile phone at a limited distance. Thanks to almighty God Amen.

Real Time Android Application (Text) Through Socket using Bluetooth Technology Page
56

You might also like