The Is Connected action is used to check whether a Bluetooth device is actively connected to the application. It is particularly useful in workflows involving data transmission, device control, or connection status, ensuring that the application operates correctly with a properly connected device.
Technical Features
1. Creating a Bluetooth Data Source
2. Adding a Bluetooth Method
3. Adding the Is Connected Action
Parameter Definitions
This action does not require any special parameters. However, you can plan the process flow by checking the results.
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.
Technical Risks and Precautions
The Is Connected action plays a critical role in ensuring the stability of Bluetooth-based application functions. With this action, the user experience can be managed according to the connection status, and seamless device integration can be provided.