|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.bluetooth.LocalDevice
public class LocalDevice
Singleton class representing a local NXT Bluetooth device. Most methods are standard, except you can also set the friendly name with this class.
Method Summary | |
---|---|
String |
getBluetoothAddress()
Returns the local Bluetooth address of NXT brick. |
DeviceClass |
getDeviceClass()
The Bluetooth device class for the LEGO NXT brick. |
int |
getDiscoverable()
Indicates whether the NXT brick is visible to other devices |
DiscoveryAgent |
getDiscoveryAgent()
Returns the discovery agent for this device. |
String |
getFriendlyName()
Returns the friendly name of a Bluetooth device. |
static LocalDevice |
getLocalDevice()
|
static String |
getProperty(String property)
UNIMPLEMENTED! Returns null always. |
static boolean |
isPowerOn()
Power state of the Bluecore 4 chip in the NXT brick. |
boolean |
setDiscoverable(int mode)
Normally the mode values are found in javax.bluetooth.DiscoveryAgent. |
boolean |
setFriendlyName(String name)
Changes the friendly name of the NXT brick. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LocalDevice getLocalDevice() throws BluetoothStateException
BluetoothStateException
public DiscoveryAgent getDiscoveryAgent()
public String getFriendlyName()
public boolean setFriendlyName(String name)
name
- new friendly name
public DeviceClass getDeviceClass()
public boolean setDiscoverable(int mode) throws BluetoothStateException
mode
- 0 = invisible, all other = visible.
BluetoothStateException
public static boolean isPowerOn()
public int getDiscoverable()
public static String getProperty(String property)
property
-
public String getBluetoothAddress()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |