Reputation: 9736
how can I tell programatically if the bluetooth is turned on or of on the device? And in ethier case turn it off or on programatically?
thanks
Upvotes: 1
Views: 1222
Reputation:
Are you talking about the popup that appears when you run the GKTank application while bluetooth is turned off? I suspect this is a function of the PeerPicker class - I haven't seen a way to query the bluetooth status directly.
However if you attempt to make a bluetooth call when bluetooth is off you'll receive a GKSessionCannotEnableError error code (Bluetooth is not currently available).
Upvotes: 1
Reputation: 15831
There's currently no way to interface with Bluetooth unless you join the Made for iPod / Works With iPhone program for some hardware you're developing.
Upvotes: 0