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
BTStatus (Function)
In French: BTEtat
Returns the current activation status of Bluetooth on the device or asks to be notified when the activation status changes. To enable or disable the Bluetooth on the device, use BTActivate.
Note: The Bluetooth functions are not available in the Android emulator.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Example
IF BTStatus() = btDisabled THEN
        BTActivate(True)
END
Syntax

Finding out the activation status of Bluetooth Hide the details

<Result> = BTStatus()
<Result>: Integer constant
Activation status of Bluetooth:
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.

Enabling the notification whenever Bluetooth activation changes Hide the details

BTStatus(<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

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 16
Comments
Click [Add] to post a comment