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:
javax.microedition.io.Connector.open() for btl2cap, btspp and btgoep protocols (both client and server connections)
javax.bluetooth.DiscoveryAgent
startInquiry()
selectService()
searchServices()
javax.bluetooth.LocalDevice
getLocalDevice()
all nonstatic methods except getDiscoveryAgent()
javax.bluetooth.RemoteDevice
getFriendlyName()
authorize()
javax.bluetooth.ServiceRecord
getConnectionURL()
populateRecord()
javax.bluetooth.L2CAPConnectionNotifier
acceptAndOpen()
javax.obex.SessionNotifier
acceptAndOpen()