Kullanıcı Kılavuzu

Is Connected

Is Connected

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

  • Connection Status Check: Determines whether the Bluetooth device is connected to the application.
  • Real-Time Monitoring: Connection status is checked as soon as the action is triggered.
  • Conditional Execution: If there is no connection, a warning can be displayed to the user or a connection action can be triggered.
  • Mobile Compatibility: Works only on iOS and Android-based mobile projects.
  • Compatible with Supporting Actions: Works with actions such as Connect, Disconnect, Send Data, Notify, and Scan For Devices.

Is Connected Action Application Steps

1. Creating a Bluetooth Data Source

  • Log in to the Kuika platform.
  • Open your mobile project from the Apps screen.
  • Go to the Datasources module.
  • Open the new data source screen using the + icon on the left. Then select Bluetooth as the Datasource Type.
  • Fill in the required fields:
  • Device Name: The visible name of the device (required)
  • Device ID: (optional)
  • Device Address: (optional - e.g., 00:1A:2B:3C:4D:5E)
  • Click the CREATE button.

2. Adding a Bluetooth Method

  1. Enter the data source you created.
  2. Click the ADD NEW METHOD button in the upper right corner.
  3. Fill in the fields in the window that opens:
    • Name: For example, checkConnection
    • Characteristic ID
    • Service ID
    • Characteristic Type: Read, Write, Notify, Indicate
  4. Click the SAVE button.

3. Adding the Is Connected Action

  1. Click on the method you created.
  2. From the Properties panel that opens on the right side:
    • +ADD ACTION → Custom → userguide123 → IsConnected_bluetooth.
  3. After making the necessary settings, click the SAVE button.

Parameter Definitions

This action does not require any special parameters. However, you can plan the process flow by checking the results.

Usage Scenario: Connection Check Before Data Transmission

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.

  • Add a Button element.
  • Set the button name to “Get Data” in the Properties panel.

2. When this button is clicked, add the following from the + ADD ACTION menu for connection checking:

  • OnClick → Custom → Kuika → IsConnected_bluetooth action.

3. Conditional Actions:

  • If connected:
  • → Add the Custom → Kuika → GetDataFromDevice_bluetooth action (data is retrieved from the device).
  • If not connected:
  • → Notify the user with the Notify action:
    • title: “Warning”
    • message: “Please connect the device.”
    • type: “warning”
    • → Then trigger the Custom → Kuika → Connect_bluetooth action (the connection process to the device is initiated).

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.

Is Connected Advanced Customizations

  • Conditional Data Transfer: Can be used with the If Then Else action to ensure data transfer only occurs when a connection is established.
  • Dynamic Device Name Display: If a connection is established, the name of the connected device can be displayed on the Label.
  • Error Handling: If no connection is available, the system can be supported with system logs or error messages.

Technical Risks and Precautions

  • Temporary Connection Losses: The device connection may be interrupted momentarily.
  • Staying Connected to Different Devices: The user may be using another device they previously connected to; verification should be performed using device name matches.
  • Platform Incompatibility: An error will occur if you try to run it on the web. The action should only be used in mobile projects.
  • Critical Pre-Processing Check: Connection verification must be mandatory before processes such as data recording and measurement.

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.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar