0

I am an student developing an android application that will need to access the Bluetooth connection/disconnection.

I am new to android but I'm studying hard to be more familiar in creating android application.

please can anyone help me how to check if Bluetooth device is connected or not?

and also i want to detect if device is suddenly disconnected.

Drew
  • 13
  • 5

1 Answers1

2

Please see these docs:

http://developer.android.com/guide/topics/connectivity/bluetooth.html

Specifically you're looking for:

Querying Paired Devices

and

Discovering devices

Also see this question:

How to programmatically tell if a Bluetooth device is connected? (Android 2.2)

EDIT: Some tutorials for you:

http://developer.android.com/training/index.html

http://www.tutorialspoint.com/android/android_bluetooth.htm

Community
  • 1
  • 1
Nathaniel D. Waggoner
  • 2,856
  • 2
  • 19
  • 41
  • sir thank you for the reply but i can't figure how to apply the codes and run it. sorry i'm just very new to this programming language – Drew Mar 11 '14 at 21:14
  • I added links to some tutorials for you. My guess is that you don't really know what you're doing, which is ok we're all there. Start with the Training link, work through ALL of those tutorials, then go to the Android_Bluetooth tutorial. – Nathaniel D. Waggoner Mar 11 '14 at 21:21