A health app automatically enters data by retrieving the user's weight from a scale via Bluetooth. The first step in this process is for the app to connect to the scale device via Bluetooth.
1. Go to the UI Design module.
- Add a Button element.
- Set the button name to “Connect to Scale” in the Properties panel.
2. When this button is clicked, add the following action from the + ADD ACTION menu to connect to the scale device:
- OnClick → Custom → Kuika → Connect_bluetooth.
- Select SmartScale_BT as the data source.
3. As the follow-up action:
- If the connection is successful, the Read method is executed, the weight data is retrieved from the scale, and displayed on the screen.
- With this flow, when the user clicks the “Connect to Scale” button, the device connects to the scale, and the weight information is automatically retrieved and displayed on the application interface.