Usage Scenario: Device Scan Screen

When a user arrives at the “Add Device” screen in the application, the system scans nearby Bluetooth devices and presents a list to the user. The user can select a device from this list to initiate the connection process.

1. Go to the UI Design module.

  • Add a Button element to the “Search for Devices” screen.
  • In the Properties panel, set the button's name to “Start Scan.”

2. For the button action, from the + ADD ACTION menu:

  • OnClick → Custom → Kuika → ScanDevices_bluetooth add the action.

3. Set the action parameters:

  • executePageInitActionAfterClose = true
  • connectingMessage = “Searching for Bluetooth devices...”
  • serviceIds = [“12345678-1234-1234-1234-1234567890ab”] (Relevant service UUID)

4. (Optional) To connect after a device is selected:

  • When the user selects a device from the list that appears after the ScanDevices action:
  • Custom → Kuika → Connect_bluetooth action can be triggered.

With this scenario, the user can see the devices in a list when the scan is started and easily connect to the desired device. To enhance the user experience, the name of the selected device can be displayed or a connection success notification can be added.