-1

Possible Duplicate:
How to enable/disable bluetooth programmatically in android

I'm trying to write an App that will turn Bluetooth on to scan for devices and connect to a specific device, if it is in range. My problem is how do I turn the Bluetooth on if it is off? If I use :

if (!mBluetoothAdapter.isEnabled()) {
    Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
    startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}

there is still a question for the user if he wants to turn the Bluetooth on. Can I turn if on programmatically without the users involvement?

Community
  • 1
  • 1
bahar_p
  • 441
  • 1
  • 8
  • 18
  • Please check below link http://stackoverflow.com/questions/3806536/how-to-enable-disable-bluetooth-programmatically-in-android – Nikhil Jul 06 '11 at 14:05

1 Answers1

0

There is no possibility to turn on some phone features like BT, GPS, WiFi without user action. It's android feature introduced in 1.6(?) due to security concerns.

piotrpo
  • 12,398
  • 7
  • 42
  • 58