Bluetooth power state and visibility mode management in push MIDlet registration

When a Bluetooth push MIDlet is registered statically (in push MIDlet installation), the API implementation checks that Bluetooth power is switched on and Bluetooth visibility is set to “Shown to all”. If the Bluetooth power state is off, the API implementation shows user a dialog asking if Bluetooth should be switched on. Similarly if the Bluetooth visibility is something else than “Shown to all”, a dialog is displayed asking if visibility should be changed. If the user answers “No” to either of these prompts, the MIDlet installation is aborted with error message “Push registration failure”.

Similar checks are made also when Bluetooth push MIDlet is registered dynamically (using javax.microedition.io.PushRegistry.registerConnection() method). If the user chooses to answer “No” to either of the dialogs in this case, the PushRegister.registerConnection() will throw javax.bluetooth.BluetoothStateException.