Thursday, December 23, 2010

[android-developers] How to detect when bluetooth is turned on by user?

Hi,

I have a implemented a Android service which start a Bluetooth server.
This is based on the example "Connecting as a server" as found on
http://developer.android.com/guide/topics/wireless/bluetooth.html.

How can I detect if Bluetooth if is turned on by the user?
Is there a notification in Adroid that my service can subscribe to?
In my current implementation I periodically poll the BluetoothAdapter
as shown below
itsBTAdapter.isEnabled().

Regards Martien

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment