开发者

Is it possible to activate bluetooth from code

开发者 https://www.devze.com 2023-01-03 00:33 出处:网络
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

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

精彩评论

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