PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Required permissions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the current status of the connection to a Bluetooth Low Energy device or asks to be notified when the connection status changes.
Remark: Bluetooth functions are not available in the Android emulator.
Versions 27 and later
Windows This function is now available for WINDEV applications in Windows.
New in version 27
Windows This function is now available for WINDEV applications in Windows.
Windows This function is now available for WINDEV applications in Windows.
Example
myDevice is btleDevice
BTLEConnect(myDevice)
...
SWITCH BTLEConnectionStatus(myDevice)
CASE btleStatusConnected
// Process
OTHER CASE
...
END
Syntax

Finding out the current connection status Hide the details

<Result> = BTLEConnectionStatus(<Device>)
<Result>: Integer constant
Connection status:
btleStatusConnectedThe device is connected to the specified Bluetooth device.
btleStatusDisconnectedThe device is not connected to the specified Bluetooth device.
<Device>: btleDevice variable
Name of the btleDevice variable corresponding to the device to use.

Enabling the notification whenever Bluetooth activation changes Hide the details

BTLEConnectionStatus(<WLanguage procedure>)
<WLanguage procedure>: Procedure name
Name of WLangage procedure ("callback" procedure) that will be called when the status of Bluetooth connection changes on the device. This procedure has the following format :
PROCEDURE <Procedure name> (<Device>, <Status>)
where:
  • <Device> is a btleDevice variable corresponding to the Bluetooth device whose status is retrieved.
  • <Status> is an integer corresponding ot the status of Bluetooth connection on the device:
    btleStatusConnectedThe device is connected to the specified Bluetooth device.
    btleStatusDisconnectedThe device is not connected to the specified Bluetooth device.
There is no need to pass parameters to this procedure. Indeed, these parameters are automatically filled during each call.
Remarks
Android

Required permissions

The call to this function modifies the permissions required by the application.
Required permission: BLUETOOTH.
This permission allows the applications to connect to the Bluetooth services.


Necessary versions
  • Android Bluetooth Low Energy WLanguage functions are only available on devices with Android 4.3 or later (api level 18).
    • A fatal error occurs if the function is used with an earlier system version.
    • To determine the version of Android the application is running on, use SysAndroidVersion.
  • iPhone/iPadIOS WidgetMac Catalyst The WLanguage Bluetooth Low Energy functions are available for the devices running iOS 9.
  • Versions 27 and later
    Windows Bluetooth Low Energy WLanguage functions are only available on:
    • PCs that support at least Bluetooth Low Energy 5.
    • PCs using a Blutooth dongle supporting Bluetooth Low Energy version 5 or higher.
    New in version 27
    Windows Bluetooth Low Energy WLanguage functions are only available on:
    • PCs that support at least Bluetooth Low Energy 5.
    • PCs using a Blutooth dongle supporting Bluetooth Low Energy version 5 or higher.
    Windows Bluetooth Low Energy WLanguage functions are only available on:
    • PCs that support at least Bluetooth Low Energy 5.
    • PCs using a Blutooth dongle supporting Bluetooth Low Energy version 5 or higher.
Business / UI classification: Business Logic
Component: wd270com.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment