Best Practices for Creating Bluetooth Applications
4/8/2010
The section provides general best practices for creating Bluetooth applications.
- Use the default Windows Mobile user interface for performing common tasks such as device discovery and pairing.
- Avoid blocking UI threads when performing tasks that are long running.
- Conserve device power. Enable the Discoverable mode only when required. Also, keep the Bluetooth radio in Power Off mode, when not in use. For more information about changing the radio state, see Changing the Bluetooth Radio Mode.
- Persist the Bluetooth radio state before launching the application. You can use the BthGetMode function to retrieve the current state of the Bluetooth radio.
- Use the following steps for application development
- Discover devices in range
- Choose a device to connect with
- Establish a secure connection through pairing
- Select a service to use on the peer device
- Transfer data to the peer device
For more information about these procedures, see Bluetooth Application Development.