BLE Component

The BLE Component can be used with various kinds of Bluetooth Low Energy devices. It provides a set of events for the results of finding and connecting to devices. It can also be used with broadcast-only devices like Beacons.

You add one BLE Component to your Project to enable Bluetooth, then each beacon is entered as a BLE Item under the BLE component. Each beacon requires its own ID number to be typed in so that the system can identify it. Then you add actions to the BLE Items that will occur when users come within the range of the beacon.

For example: the beacon’s interaction with the Project can map and direct consumers’ movement within a space; when the consumer comes close to the beacon, the project can notify them with a text popup of special offers, exclusive rewards or extra product information.

Beacons can also be used in the Offline Map component to provide indoor location.


Setting up a BLE Component

Check Bluetooth Permission

Important: You will need to add the Check Bluetooth Permission action before any other Bluetooth actions can be used. The “After Page Show” event is a good place for this. Further Bluetooth actions can then be added to the “On Permission Granted” event of the BLE Component.

Users will only be shown the Check Bluetooth Permission dialog the first time they use the app. If the user happens to choose ‘Deny’, they will need to go the the device’s App Settings to give Bluetooth permission before the App can run any Bluetooth functions.

Starting Bluetooth Scanning

You will need to add a Set BLE Frequency action somewhere to start Bluetooth scanning. You might place this action on a BLE Component’s “On Permission Granted” event, or on a Button click. If the user has not enabled Bluetooth on their device, they will usually be prompted to allow the App to use Bluetooth.

Go on to add BLE Items under the BLE component for each beacon.


Events

Except for On Enable and On Disable these events require advanced programming knowledge. Refer to IoT/SDK documentation for the other events.


Actions affecting the BLE Component

There are several specific actions related to the BLE Component in the IoT Actions tab. Using either Set BLE Frequency or Enable Bluetooth is required to start operation. See IoT Actions.

If you’re only using Beacons, and no other types of Bluetooth device, only the Set BLE Frequency action is useful.


Setting up a BLE Item

Using the plus button on the BLE Component you can add BLE Items for each Kontakt Beacon you want to scan for. These will be grouped under the BLE Component.

BLE Item properties

IDRequired. Pops up text editor panel to enter the Kontakt Beacon ID, such as “rtFXp8”
CloseDefines the signal strength that will be considered “Close”. Slider to indicate signal strength in
decibels (-180 to 0) The default setting is -80 and is generally a very appropriate level.
Very CloseDefines the signal strength that will be considered “Very Close”. Slider (-180 to 0) The default
setting is -60 and is generally a very appropriate level.

BLE Item Events

BLE Items have the following events that can occur:

The actions may be connected to the movement of a phone, your car keys or travel luggage as examples.