Sun Microsystems J2ME Tool Storage User Manual


 
73
CHAPTER
11
Using the Bluetooth and OBEX
APIs
The J2ME Wireless Toolkit emulator supports JSR 82, the Java APIs for Bluetooth.
JSR 82 includes two independent APIs:
The Bluetooth API provides an interface to Bluetooth wireless networking,
including device discovery and data exchange.
The OBEX API allows applications to use the Object Exchange (OBEX) protocol
over Bluetooth or other communication channels.
This chapter describes how the J2ME Wireless Toolkit implements the Bluetooth
and OBEX APIs.
11.1 Bluetooth Simulation Environment
The J2ME Wireless Toolkit emulator allows you to develop and test application that
use Bluetooth without having actual Bluetooth hardware. The toolkit simulates a
Bluetooth environment for running emulators. Multiple emulator instances can
discover each other and exchange data using the Bluetooth API.
For an example, see the documentation of BluetoothDemo in Appendix A,
“Application Demonstrations.”
11.2 OBEX Over Infrared
The J2ME Wireless Toolkit implements OBEX transfer over simulated Bluetooth
and infrared connections. The simulated infrared connection follows the IrDA
standard (see http://www.irda.org/). Simulated infrared transfers can take
place between multiple running emulators.