Kullanıcı Kılavuzu

Bluetooth Permission Is Given

Bluetooth Permission Is Given

Bluetooth Permission Is Granted action is used to check whether Bluetooth permission has been granted by the user in a mobile application. This action ensures that the necessary permissions are verified before Bluetooth-enabled features are used, and appropriate warnings can be displayed to the user.

Technical Features

  • Bluetooth Permission Check: Checks whether the user has granted Bluetooth access.
  • Warning Display: If permission is not granted, a warning can be displayed to the user.
  • Mobile Support: The action only works on mobile platforms.
  • Custom Method Compatible: Can be used in custom methods linked to the Bluetooth data source.
  • Dynamic Usage: Can be integrated with other actions using conditional operations.

Bluetooth Permission Is Given Application Steps

1. Adding 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 and optional fields:
    • Device Name (required)
    • Device ID (optional)
    • Device Address (optional)
  • Complete the registration with CREATE.

2. Define a New Method

  • Go to the data source you saved → click the ADD NEW METHOD button.
  • Fill in the required fields:
    • Name
    • Characteristic ID
    • Service ID
    • Characteristic Type (Read, Write, Notify)

3. Adding the Bluetooth Permission Is Given Action

  • Click on the method you created.
  • From the Properties panel on the right:
    • + ADD ACTION → Custom → userguide123 → Select BluetoothPermissionIsGiven_bluetooth.

Parameter Definitions

  • showAlert (Boolean): Should a warning be displayed if permission is not granted? Example: true
  • alertMessage (String) The warning message to be displayed to the user. Example: “Please grant Bluetooth permission”

Usage Scenario: Bluetooth Permission Check in a Mobile Application

On an application screen, the user will be asked to grant Bluetooth permission. When the user clicks the “Scan Devices” button, a warning message will be displayed if the application does not have Bluetooth permission.

1. Go to the UI Design module.

  • Add a Button element.
  • In the Properties panel, set the button name to “Scan Devices.”

2. To check Bluetooth permission when this button is clicked, add the following action from the + ADD ACTION menu:

  • OnClick → Custom → Kuika → BluetoothPermissionIsGiven_bluetooth.

3. Action configuration:

Enter the action parameters as follows:

  • showAlert: true
  • alertMessage: “Bluetooth permission is required to scan devices.”

Once these steps are complete, when the user clicks the button, the application checks whether Bluetooth permission has been granted. If permission has not been granted, a warning message is displayed on the screen.

Bluetooth Permission Is Given Action Advanced Customizations

  • Conditional Flow Management: If Bluetooth permission is not granted, an alternative flow can be directed with a Condition action.
  • Dynamic Alert Text: The alert text can be customized in multiple languages based on the user's language or device information.
  • Request Permission Again: Navigate or Open External URL actions can be defined to redirect the user to the settings screen if permission is not granted.

Technical Risks and Controls

  • Mobile Only: The action does not work in a web environment and should only be used on mobile devices.
  • Permission Requirement: If the user's Bluetooth permission is disabled at the system level, it cannot be enabled by the application.
  • User Experience: If the warning message is not displayed, the user may not understand why the process did not occur. showAlert is recommended.
  • Platform Differences: Permission mechanisms may differ between Android and iOS operating systems. These differences should be taken into account.

The Bluetooth Permission Is Given action ensures that the necessary permissions are obtained from the user before performing Bluetooth-based operations in your mobile application. It provides a controlled and informative experience for the user, making application functionality safer and smarter.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar