Bluetooth power state checking in API method calls

When the application calls a Bluetooth API method that requires Bluetooth to be switched on, the API implementation checks if the Bluetooth power state is off and in this case prompts the user with a dialog asking if Bluetooth should be switched on. If the user chooses not to switch Bluetooth on, the API method call will throw javax.bluetooth.BluetoothStateException. The Bluetooth power state check is made in the following API methods: