PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • 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 Bluetooth activation status on the device or asks to be notified when the activation status changes.
Remarks:
  • To enable or disable the Bluetooth on the device, use BTActivate.
  • Bluetooth functions are not available in the Android emulator.
Example
StatusBTLE is int
StatusBTLE = BTLEStatus()
SWITCH StatusBTLE
CASE btEnabled
// Process
OTHER CASE
...
END
Syntax

Finding out the current activation status of Bluetooth on the device Hide the details

<Result> = BTLEStatus()
<Result>: Integer constant
Bluetooth LE activation status:
btEnabledThe Bluetooth is enabled on the device.
btActivationInProgressThe Bluetooth is being enabled on the device.
btDeactivationInProgressThe Bluetooth is being disabled on the device.
btDisabledThe Bluetooth is disabled on the device.
btErrorThe Bluetooth activation status could not be retrieved.
btNotInitializedThe initialization of Bluetooth Low Energy was not performed.

Enabling the notification whenever Bluetooth activation changes Hide the details

BTLEStatus(<WLanguage procedure>)
<WLanguage procedure>: Procedure name
Name of the WLangage procedure ("callback" procedure) that will be called when the Bluetooth activation status changes on the device. This procedure has the following format :
PROCEDURE <Procedure name> (<New status>, <Former status>)
where:
  • <New Status> is an integer corresponding ot the new activation status of Bluetooth on the device.
  • <Former status> is an integer corresponding to the activation status of Bluetooth on the device before changing status.
These integers correspond to the following constants:
btEnabledThe Bluetooth is enabled on the device.
btActivationInProgressThe Bluetooth is being enabled on the device.
btDeactivationInProgressThe Bluetooth is being disabled on the device.
btDisabledThe Bluetooth is disabled on the device.
The parameters of this procedure are optional. There is no need to pass parameters to this procedure. Indeed, these parameters are automatically filled during each call.
If this parameter corresponds to an empty string (""), the notifications will not be sent anymore when the status changes. The function has no effect if no notification request was performed.
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.
Component : wd250android.jar
Minimum version required
  • Version 21
Comments
Click [Add] to post a comment