Is there any API for checking the Bluetooth radio ON/OFF status? or any API for enable the bluetooth?

I am developing a bluetooth application with auto start on device startup feature. My application will try to open connection with the first paired BT device @ start-up. But the BT open activity was failed due to Bluetooth radio is OFF at the start-up.

But , if i use the API javax.bluetooth.DiscoveryAgent.startInquiry(), the device is asking to enable the bluetooth. So there may be an API retrieving the bluetooth status.

You can get the BT radio status, but the best you can do is to get the system to ask the user to enable BT as you have seen. There doesn't seem to be any way to turn the BT radio on without user action, probably for security.

Thank you for your quick reply.
could you please tell me how can we get the status?
Actually the BT radio was turned on before the device going to soft reset/hard reset. So the device will turn on the BT radio automatically after the reset. but my application is trying to open the BT connection before the BT radio was turned on by the starting process.

Ah ok see your need. I'm away from my code base and can't remember if I use an API call, or a connection failure to find out if the radio is off but have a look at:
javax.bluetooth.LocalDevice.isPowerOn()

Thank you... i can get the status with javax.bluetooth.LocalDevice.isPowerOn().

But How can we instruct the blackberry device to Turn ON the bluetooth radio?

Currently i found that, if the BT radio is turned off and user make a call on javax.bluetooth.DiscoveryAgen.StartInquiry(), the Blackberry will POP -up a message " The Application name requires bluetooth to be enabled. Enable Bluetooth? yes | No.

Actually i am searching for a function to do the same. ( i don't want to search the bluetooth devices in range... coz i already have paired devices:smileymad: )

I don't think there is a way for a third party app to turn Bluetooth on. The best you can do is call StartINquiry() and hope the user will agree to turn it on. Bluetooth is a suspect technology in the Blackberry world, there are lots of ways it has been used to attack mobile phones.