Is there a simple tutorial or dose anyone have code to toggle Bluetooth on and off using a Toggle-button in eclipse building for android?
If anyone can help that will be greatly appreciated.
-Thanks in advance.
Is there a simple tutorial or dose anyone have code to toggle Bluetooth on and off using a Toggle-button in eclipse building for android?
If anyone can help that will be greatly appreciated.
-Thanks in advance.
Manifest:
You'll need
in your manifest file, and variables like:
and
so that in your OnCreate you can do something like:
where the user response to the "turn bluetooth on" prompt is caught in
Take a look at http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html
try this
download this example this will help you
https://github.com/siddhpuraamitr/Blutooth-Toggle-Widget