How can I know bluetooth is enabled or not on Windows phone 8? -
i can use connectionsettingstask access bluetooth settings, how can know whether bluetooth's enabled after task completed?
i checked windows phone marketplace, found app can that, example:
http://www.windowsphone.com/en-us/store/app/quick-settings/2a2cbaa7-6d75-420c-ae14-2339618da43e
thanks!
it's suggestion,this using, sure there better ways
private async void findpaired() { windows.networking.proximity.peerfinder.start(); try { var peers = await windows.networking.proximity.peerfinder.findallpeersasync(); bth = true; //boolean variable } catch (exception ex) { if ((uint)ex.hresult == 0x8007048f) { bth = false; } } }
an error 0x8007048f
indicated if bluetooth turned off. working me without problems. more information visit link
good luck mate (:
Comments
Post a Comment