In a health app, when the user clicks the “Get Data” button, the Bluetooth connection of the blood pressure monitor is checked before data is retrieved from the device. If the device is not connected, a warning is displayed to the user, and then the connection process is initiated.
1. Go to the UI Design module.
2. When this button is clicked, add the following from the + ADD ACTION menu for connection checking:
3. Conditional Actions:
With this scenario, the user does not encounter a direct data retrieval error when the device is not connected; the system first checks the connection, connects if necessary, and then proceeds with data retrieval.