Prev | Current Page 81 | Next

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

"Bluetooth Application Programming with the Java APIs Essentials Edition"

append("IOException: ");
f.append(e.getMessage());
}
} else {
// Unable to locate a service so just print an error
// message on the screen
f.append("Unable to locate service");
}
} catch (BluetoothStateException e) {
f.append("BluetoothStateException: ");
f.append(e.getMessage());
}
}
}
50 Chapter Three: High-Level Architecture
After building and packaging the HelloClient MIDlet, the next step is
to configure two Bluetooth devices in the simulator. (Remember to copy
the BluetoothMIDlet class to the HelloClient project??™s source directory.)
Start the simulator according to the instructions in the Motorola
SDK. After starting the simulator, create two new Bluetooth devices
named ??????client??™??™ and ??????server??™??™ (see Figure 3.6).
Once the two devices are configured in the simulator, the Motorola
LaunchPad application can be started. Instead of starting the application
from the Start Menu, open two MS-DOS command prompts. Within
each command prompt, change to the ??????C:\Program Files\Motorola\
Motorola Java ME SDK v6.4 for Motorola OS Products??™??™ or the directory
in which Motorola LaunchPad was installed. In one MS-DOS prompt,
enter the command ??????set SIM_FRIENDLY_NAME=server??™??™ without the
quotes. In the other MS-DOS prompt, enter the command ??????set
Figure 3.


Pages:
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93