beautypg.com

2 bluetooth discovery timeout, 3 bluetooth system properties, 4 bluetooth bcc properties – Sun Microsystems J2ME User Manual

Page 87: Bluetooth discovery timeout, Bluetooth system properties, Bluetooth bcc properties

background image

Chapter 11

Using the Bluetooth and OBEX APIs

75

11.3.2

Bluetooth Discovery Timeout

In the Bluetooth section of the preferences window, the Device discovery timeout
is the amount of time, in milliseconds, the emulator will wait while attempting to
locate other devices in the simulated Bluetooth environment.

11.3.3

Bluetooth System Properties

The System Properties tab in the Bluetooth section of the preferences contains
properties that can be retrieved in an application using the

getProperty()

method in

javax.bluetooth.LocalDevice

.

The Bluetooth properties are fully described in the JSR 82 specification.

11.3.4

Bluetooth BCC Properties

The Bluetooth Control Center (BCC) controls Bluetooth settings. Some devices may
provide a GUI to customize Bluetooth settings. In the J2ME Wireless Toolkit, the
BCC is configured using the BCC Properties tab of the Bluetooth preferences. The
properties are as follows:

TABLE 7

BCC properties

Property

Description

Enable Bluetooth
support

If this property is disabled, then

LocalDevice.getLocalDevice()

throws a

BluetoothStateException

and no connections can be created.

This is useful to test the behavior of your application on devices
that support JSR 82 but may have the Bluetooth feature turned off.

Device is
discoverable

This property indicates whether or not this emulator can be
discovered by other emulators.

Friendly name

The friendly name is a human-readable name for the emulator in
the simulated Bluetooth environment. If the name is left blank, the
emulator will not support the “friendly name” feature.

Encryption

This property determines whether connection encryption is
supported (

on

) or not (

off

). In addition, the

force

settings means

all connected must be encrypted. See the documentation for

RemoteDevice

’s

encrypt()

method for details.

Authorization

This is similar to the Encryption property. See

RemoteDevice

’s

authorize()

method.

Authentication

This is similar to Encryption and Authorization. See

RemoteDevice

’s

authenticate()

method.