Usage Scenario: Bluetooth Control on Mobile Device

On an application screen, we want to add a button to prompt the user to turn on Bluetooth. When the user presses the “Scan with Bluetooth” button, a warning will be shown if Bluetooth is not turned on on the device.

1. Switch to the UI Design module.

  • Add a Button element.
  • In the Properties panel, name the button as “Scan with Bluetooth”.

2. To start the scanning process when this button is clicked + ADD ACTION menu:

OnClick → Custom → Kuika → BluetoothIsOpen_bluetooth action.

3. Action configuration:

Enter the parameters of the action as follows:

  • showAlert: true
  • alertMessage: “Please turn on Bluetooth”

After these steps, when the user presses the button, a warning message will be displayed on the screen if Bluetooth is not turned on on the device.