PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Use conditions
  • Required permissions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns the current connection status to a Bluetooth Low Energy device or asks to be notified when the connection status changes.
Note: The Bluetooth functions are not available in the Android emulator.
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 btleDevice variable corresponding to the device to use.

Enabling the notification whenever Bluetooth activation changes Hide the details

BTLEConnectionStatus(<Procedure Name>)
<Procedure Name>: Character string (with or without quotes)
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

Use conditions

  • Android The WLanguage Bluetooth Low Energy functions are available for the devices running an Android version greater than or equal to version 4.3 (api level 18).
    • A fatal error will occur if the function is used with an earlier system version.
    • To find out the version of Android system on which the application is run, use SysAndroidVersion.
  • iPhone/iPad The WLanguage Bluetooth Low Energy functions are available from iOS 9.
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.
Components
Android wd230android.jar
Minimum required version
  • Version 21
Comments
Click [Add] to post a comment