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.
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:
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.