Swati
Swati

Reputation: 2918

Is it possible to activate bluetooth from code

hey in my application i have to give user an option called "BLUETOOTH"

Is it possible that i can put it ON or OFF from my code

i have no idea....

Am i doing right or just trying to do unnecessary work

Upvotes: 2

Views: 178

Answers (1)

Marc Novakowski
Marc Novakowski

Reputation: 45398

You can check if the Bluetooth radio is on or off using LocalDevice.isPowerOn() but there isn't a direct way to turn on the radio from code. However, if you call DiscoveryAgent.startInquiry() when the radio is off, it will prompt the user to turn Bluetooth on.

Upvotes: 4

Related Questions