Prev | Current Page 161 | Next

Timothy J. Thompson, C Bala Kumar, and Paul Kline

"Bluetooth Application Programming with the Java APIs Essentials Edition"

getDisplay(this);
Form infoForm = new Form("Device Info");
currentDisplay.setCurrent(infoForm);
// Add the exit command and set the listener
infoForm.addCommand(new Command("Exit",
Command.EXIT, 1));
infoForm.setCommandListener(this);
}
}
126 Chapter Six: Device Discovery
Now that the BluetoothInfoMIDlet has been created, the
getBluetoothInfo() method is added. The getBluetoothInfo()
method retrieves the Bluetooth device information and displays it on
the screen. This method ?¬?rst retrieves the LocalDevice object. Next,
the Bluetooth address is retrieved and displayed on the screen. Before the
Table 6.1 Properties Available through LocalDevice.getProperty()
Property Description Valid Value
bluetooth.api.version The version of JABWT that is supported.
This property does not relate to the
Bluetooth specification number.
Depends on the
JABWT version
bluetooth.master.switch Is master/slave switch allowed? ??????true??™??™ or ??????false??™??™
bluetooth.sd.attr.retrievable.max Maximum number of service attributes
to be retrieved per service record.
A base
10 integer (e.g.,
??????1??™??™, ??????2??™??™)
bluetooth.connected.devices.max Maximum number of connected devices
supported.
A base 10
integer (e.g.,
??????1??™??™, ??????2??™??™)
bluetooth.l2cap.receiveMTU.max Maximum receiveMTU size in bytes
supported in L2CAP
A base 10
integer (e.


Pages:
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173