1

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

nico
  • 9,668
  • 8
  • 26
  • 28

2 Answers2

1

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

0

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.

aehlke
  • 15,225
  • 5
  • 36
  • 45
  • 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 Jul 27 '09 at 15:23