danger.bluetooth
Class Bluetooth

java.lang.Object
  extended by danger.bluetooth.Bluetooth


public class Bluetooth
extends Object

Since:
3.0

Method Summary
static String getAddress()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Return the address of this device.
static boolean isOn()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Return the current on/off status of the Bluetooth radio
static void registerBluetoothEventsListener(Listener listener)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Register for Bluetooth events Calling this will cause Bluetooth events to be sent to the listener.
static void showPairingDialog()
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Display the pairing dialog to allow the user to pair with a device.
static void unregisterBluetoothEventsListener(Listener listener)
          EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.Unregister for Bluetooth events Calling this will unregister a previously registered listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isOn

public static boolean isOn()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Return the current on/off status of the Bluetooth radio

Returns:
boolean whether the radio is on or off

getAddress

public static String getAddress()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Return the address of this device.

Returns:
String The string representation of the bluetooth address for this device.

registerBluetoothEventsListener

public static void registerBluetoothEventsListener(Listener listener)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Register for Bluetooth events Calling this will cause Bluetooth events to be sent to the listener. The events are listed below. The current state will be sent when you make this call. EventType.EVENT_BLUETOOTH_STATE_CHANGED EventType.WHAT_BLUETOOTH_OFF EventType.WHAT_BLUETOOTH_ON

Parameters:
listener - The listener the events will be sent to.

unregisterBluetoothEventsListener

public static void unregisterBluetoothEventsListener(Listener listener)
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Unregister for Bluetooth events Calling this will unregister a previously registered listener. The events are listed below. EventType.EVENT_BLUETOOTH_STATE_CHANGED EventType.WHAT_BLUETOOTH_OFF EventType.WHAT_BLUETOOTH_ON

Parameters:
listener - The listener to be unregistered.

showPairingDialog

public static void showPairingDialog()
EXPERIMENTAL Experimental APIs are APIs that are early-stage and not yet finalized or fully qualified. In future releases, these APIs may be changed in incompatible ways, replaced or even removed completely without warning. For these reasons, Danger will not publish applications that use any experimental APIs.
Display the pairing dialog to allow the user to pair with a device.