Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0, CLDC

Get PDF Book Print View
 

Document Information

Getting Started

Features

Using Sample Projects

Creating and Editing Projects

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Monitoring Network Traffic

Security and MIDlet Signing

Command Line Reference

Logs

JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

Bluetooth Simulation Environment

OBEX Over Infrared

Setting Bluetooth and OBEX Preferences

Running the Bluetooth Demo

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 226: Scalable 2D Vector Graphics

JSR 229: Payment API Support

JSR 238: Mobile Internationalization API (MIA)

JSR 256: Mobile Sensor API Support

Index


Setting Bluetooth and OBEX Preferences

The Java ME Platform SDK enables you to configure the Bluetooth and OBEX simulation environment. Choose Edit > Preferences and select Bluetooth/OBEX to display the following window.

OBEX Preferences

Devices using IrDA in the real world discover other devices by listening. You can configure how long the Java ME Platform SDK emulator waits to discover another device using the Discovery timeout field in the IrDA OBEX section of the preferences window. Enter a value in milliseconds.

At the API level, the discovery timeout value determines how long a call to Connector.open("irdaobex://discover...") blocks before it returns or throws an exception.

The maximum packet length affects how much data is sent in each packet between emulators. Shorter packet values result in more packets and more packet overhead.

Bluetooth Internal Properties

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

Bluetooth Address of Next Emulator is the Bluetooth address to be assigned to the first emulator instance. Subsequent instances of the emulator receive an automatically generated address.

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.

Bluetooth BCC Properties

The Bluetooth Control Center (BCC) controls Bluetooth settings. Some devices might provide a GUI to customize Bluetooth settings. In the Java ME Platform SDK, the BCC is configured using the BCC Properties tab of the Bluetooth preferences. The properties are as follows.

BCC Properties  
Property
Description
Enable Bluetooth support
If this property is disabled, 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 might have the Bluetooth feature turned off.
Device is discoverable
Indicates whether or not this emulator can be discovered by other emulators.
Friendly name
A human-readable name for the emulator in the simulated Bluetooth environment. If the name is left blank, the emulator does not support the friendly name feature.
Encryption
Determines whether connection encryption is supported (on) or not (off). In addition, the force settings means all connections must be encrypted. See the documentation for the RemoteDevice encrypt() method for details.
Authorization
Similar to the Encryption property. See the RemoteDevice authorize() method.
Authentication
Similar to Encryption and Authorization. See the RemoteDevice authenticate() method.