views:

632

answers:

2

Hello, 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

A: 

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.

Wahnfrieden
This is not what I meant. What I'm looking for is something like when you are about to usa an app that uses GameKit, the system promps a window that asks the user if he wants to turn on the bluetooth because te app needs it.
nico
+1  A: 

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).