This sample app shows how the Scan and Pair API is used to programmatically pair two Bluetooth devices.
NOTE: The appearance of sample app screens can vary by sample app version, Android version and screen size.
1. Download, build and install the sample app. For help, please see the Sample App Set-up Guide.
2. When the application starts, it should look similar to the image below. Confirm that the "Always Scan" and "Hard Trigger" check boxes are checked and that the "ScanData Type" is set to "MAC_ADDRESS."
3. Press the "Pair" button. The status label (in the lower section of the app) indicates that the Scan and Pair process has started and prompts the user to press the hard scan trigger.
4. Place the pairing barcode in view of the device's scan window and press the hard scan trigger. The app retrieves the MAC address from the barcode, places it in the Bluetooth Address field and initiates the pairing and connection process. Press Pair in the pairing request dialog (as seen below) to complete the pairing process.
Pairing has completed successfully when the status label displays "Bluetooth device is paired successfully."