Professional Documents
Culture Documents
Serving Nation"
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459 (Online), Volume 4, Special Issue 1, February 2014)
International Conference on Advanced Developments in Engineering and Technology (ICADET-14), INDIA.
Lord Krishna College of Engineering (An ISO 9001:2008 Certified Institute) Ghaziabad, Uttar Pradesh, INDIA. Page 135
"Sharpening Skills.....
Serving Nation"
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459 (Online), Volume 4, Special Issue 1, February 2014)
International Conference on Advanced Developments in Engineering and Technology (ICADET-14), INDIA.
III. P ROCESS OF B LUETOOTH CHAT APPLICATION
i. It first checks whether the Bluetooth of the
devices is in ON/OFF mode.
ii. If the Bluetooth of the devices is in OFF mode
then it makes the request to enable the
Bluetooth.
iii. Perform scanning of the devices which are in
their range.
iv. Display the list of all the devices in the range.
v. Select the device with which one wants to do the
chat.
vi. If the device connects then set up the chat
session.
Lord Krishna College of Engineering (An ISO 9001:2008 Certified Institute) Ghaziabad, Uttar Pradesh, INDIA. Page 136
"Sharpening Skills.....
Serving Nation"
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459 (Online), Volume 4, Special Issue 1, February 2014)
International Conference on Advanced Developments in Engineering and Technology (ICADET-14), INDIA.
iii. Connecting Bluetooth: Request the BLUETOOTH
PERMISSION in order to perform any Bluetooth
communication, such as requesting a connection,
accepting a connection and ransferring the data.
The process of pairing connection shown in the
following diagram:
Lord Krishna College of Engineering (An ISO 9001:2008 Certified Institute) Ghaziabad, Uttar Pradesh, INDIA. Page 137
"Sharpening Skills.....
Serving Nation"
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459 (Online), Volume 4, Special Issue 1, February 2014)
International Conference on Advanced Developments in Engineering and Technology (ICADET-14), INDIA.
V. DESIGN O F MODULES W ITH S AMPLE CODE Sample code : startDiscovery method is used in the
i. Discovering Devices: Device discovery is a class of BluetoothAdapater. It executes asynchronously,
scanning procedure and searches the local area for so we do not consider the thread is blocked. Whole
Bluetooth enabled devices. If the Bluetooth device process takes about 12 seconds[3]. Then register a
is currently enabled to be discoverable then only it BroadcastReceiver object to receive the Bluetooth device
will respond to the discovery request. If the device information. Then filter ACTION_FOUND intent to
is discoverable then it will respond by sharing some obtain the tailed information for each remote device.
information such as device name, class and its // Create a BroadcastReceiver for ACTION_FOUND
unique MAC address. First time connection request private final BroadcastReceiver mReceiver = new
automatically presented to the user. The information BroadcastReceiver() {
can be read using the Bluetooth APIs. public void onReceive(Context context, Intent intent) {
Difference between paired and being connected are: String action = intent.getAction();
// When discovery finds a device
Paired To be connected if (BluetoothDevice.ACTION_FOUND.equals(action))
{
Two devices Devices // Get the BluetoothDevice object from the Intent
are aware of each others currently share an BluetoothDevice device =
existence. RFCOMM channel. intent.getParcelableExtra(BluetoothDevice.EXTRA_DE
They have a Transmit VICE);
shared link-key that can be data with each // Add the name and address to an array adapter to
used for the authentication. other. show in a ListView
Capable of mArrayAdapter.add(device.getName() + "\n" +
establishing an encrypted device.getAddress()); }}};
connection with each other.
Lord Krishna College of Engineering (An ISO 9001:2008 Certified Institute) Ghaziabad, Uttar Pradesh, INDIA. Page 138
"Sharpening Skills.....
Serving Nation"
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459 (Online), Volume 4, Special Issue 1, February 2014)
International Conference on Advanced Developments in Engineering and Technology (ICADET-14), INDIA.
ii.Paired Device: getBondedDevices() method is used Connect devices; and
in the pairing a Bluetooth device in the class Transfer data.
BluetoothAdapter to obtain a paired device. This
method returns the array of Bluetooth device to iv. Server Design: Server is needed to connect the two
distinguish between each paired device. devices because it holds an open
bluetoothserversocket. It is designed to listen for
Sample code: incoming connection requests.
Set<BluetoothDevice> pairedDevices = Call
mBluetoothAdapter.getBondedDevices(); listenUsingRfcommWithServiceRecord(String,
// If there are paired devices UUID) to get Bluetooth server socket.
if (pairedDevices.size() > 0) { String = Name of the service,
// Loop through paired devices UUID = sign of connection
for (BluetoothDevice device : pairedDevices) { Call the method accept() to listen for connection
// Add the name and address to an array adapter to request and return a connection on Bluetooth
show in a ListView socket bluetoothsocket.
mArrayAdapter.add(device.getName() + "\n" + Call the method close() after listening to a
device.getAddress());}} connection to close the listener.
iii. Establishing: For the establishment of a Bluetooth v. Client Design: Bluetooth Device object is used to
communication must go through : initialize a connection. Obtain the Bluetooth socket
Get local Bluetooth devices; and initialize the connection by the
Find the remote device; BluetoothDevice object.
Pairing;
Lord Krishna College of Engineering (An ISO 9001:2008 Certified Institute) Ghaziabad, Uttar Pradesh, INDIA. Page 139
"Sharpening Skills.....
Serving Nation"
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459 (Online), Volume 4, Special Issue 1, February 2014)
International Conference on Advanced Developments in Engineering and Technology (ICADET-14), INDIA.
VI. ADVANTAGE O F B LUETOOTH CHAT IN ANDROID VII. LIMITATIONS O F C HATTING ROOM SYSTEM IN
i. Low-power & low-cost wireless connection. ANDROID B LUETOOTH
ii. Open standard short-range wireless i. Strangers can communicate with others using
communication. Bluetooth devices.
iii. Bluetooth offers higher level service profiles, ii. Bluejacking, refers to people who send
such as FTP-like file servers, voice irrelevant, surprising, or shocking messages to
transport, and more.[8] strangers in their vicinity.
iv. Innovative approach to the mobile world. iii. Limited range to chat.[7]
v. No GSM or Wi-Fi connection required.
vi. Bluetooth does not need a license around the VIII. CONCLUSION AND F UTURE W ORKS
globe for the working frequency band. The internet age of today chat room is of a great
vii. Low cost transmission technology for the entertainment features project. Most of the internet user
handheld devices. likes it.
Lord Krishna College of Engineering (An ISO 9001:2008 Certified Institute) Ghaziabad, Uttar Pradesh, INDIA. Page 140
"Sharpening Skills.....
Serving Nation"
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459 (Online), Volume 4, Special Issue 1, February 2014)
International Conference on Advanced Developments in Engineering and Technology (ICADET-14), INDIA.
Android provides the design and realization of [7] FELMETSGER, V., CAVEDON, L., KRUEGEL, C., AND
VIGNA, G. Toward Automated Detection of Logic
chatting room system is good for developing Bluetooth
Vulnerabilities inWeb Applications. In Proceedings of the
network application and Bluetooth agreement. The USENIX Security Symposium (2010).
system have realized the broadcast and private chat [8] FIRST TECH CREDIT UNION. Security Fraud: Rogue Android
between mobile phones. But few still need to further Smartphone app created. Dec. 2009.
improve the usability and functionality of the system like [9] GOODIN, D. Backdoor in top iphone games stole user data, suit
richer input format, the expression of information, claims. The Register, November 2009.
pictures, information transmission etc. [10] HOVEMEYER, D., AND PUGH, W. Finding Bugs is Easy. In
Proceedings of the ACM conference on Object-Oriented
REFERENCES Programming Systems, Languages, and Applications (2004).
[1] E2ECloud studio. Google Android[M] posts & telecom press. [11] JOHNS, T. Securing Android LVL Applications. 2010.
2009 [12] JUNG, J., SHETH, A., GREENSTEIN, B., WETHERALL,
[2] [2] The Bluetooth Special Interest Group. Bluetooth Specification D.,MAGANIS, G., AND KOHNO, T. Privacy Oracle: A System
Core v4.0 (2009-02). [3] Han Chao, Liang Quan, Principles and for Finding Application Leaks with Black Box Differential
development points of the Android system[M]. Publishing House Testing. In Proceedings of the ACM conference on Computer and
of Electronics industry. 2010 Communications Security (2008).
[3] yang Fegsheng. Android Inside [M]. Machinery Industry Press. [13] KASPERSKEY LAB. First SMS Trojan detected for smartphones
2008 running Android. August 2010.
[4] Andre N Klingsheim. J2ME Bluetooth Programming[D]. [14] KIRDA, E., KRUEGEL, C., BANKS, G., VIGNA, G., AND
Department of informatics University of Bergen, 2004 KEMMERER, R. A. Behavior-based Spyware Detection. In
Proceedings of the 15th USENIX Security Symposium (Aug.
[5] W., ONGTANG, M., AND MCDANIEL, P. OnLightweight 2006).
Mobile Phone Application Certification. In Proceedingsof the
16th ACM Conference on Computer and Communications
Security (CCS) (Nov. 2009).
[6] ENCK, W., ONGTANG, M., AND MCDANIEL, P.
Understanding Android Security. IEEE Security & Privacy
Magazine 7, 1 (January/February 2009), 5057.
Lord Krishna College of Engineering (An ISO 9001:2008 Certified Institute) Ghaziabad, Uttar Pradesh, INDIA. Page 141