开发者

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜