PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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 activation status of Bluetooth on the device or asks to be notified when the activation status changes.
Notes:
  • To enable or disable the Bluetooth on the device, use BTActivate.
  • The 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
Activation status of Bluetooth LE:
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 activation status of Bluetooth was not retrieved.
btNotInitializedThe initialization of Bluetooth Low Energy was not performed.

Enabling the notification whenever Bluetooth activation changes Hide the details

BTLEStatus(<Procedure Name>)
<Procedure Name>: Character string (with or without quotes)
Name of the WLangage procedure ("callback" procedure) that will be called when the activation status of Bluetooth 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.
Components
Android wd230android.jar
Minimum required version
  • Version 21
Comments
Click [Add] to post a comment