tags:

views:

194

answers:

1

I have written code to enable and disable various things programatically like Wifi, Ringer modes, Airplane modes. All things that you would see in a power toggle widget.

The one that I have not found out how to do is bluetooth. It appears that in SDK level 3 (OS 1.5) there is no pretty bluetooth manager class. Has anyone pinpointed any good source examples on enabling and disabling bluetooth that will also be forwards compatible with users running 2.0 (Droid) / 2.1 (Nexus)?

I have found a few partial examples in my google searches that I could not get to actually run.

Thanks!

A: 

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

This has alot of great examples and teaches you the basic gist of starting up bluetooth and getting sockets.

You should probably read the whole thing but just for a quick starter look at the section called "Setting Up Bluetooth"

ThePosey
That is all for SDK level 5 (2.0) and not SDK 3 (1.5) which is what we are needing here. The link you provided revolves around the BluetoothAdapter class which doesn't exist in SDK 3.
pcm2a