ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / BTLE functions
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
Active ou désactive la détection des changements de valeur d'une caractéristique Bluetooth Low Energy.
Par exemple, lors de l'utilisation d'un capteur de température, il est possible de savoir que la température change.
New in version SaaS
WINDEVWindows Cette fonction est désormais disponible pour les applications WINDEV sous Windows.
Example
caractéristique est une btleCaractéristique
caractéristique.ChangementValeur(ProcDétecteChangement)
// ===========================
PROCEDURE CB_ChangementValeur(caractéristique est une btleCaractéristique <utile>, bufValeur est un Buffer)
// Récupération de la valeur et affichage dans un champ Libellé
sBuf est une chaîne ANSI = bufValeur
LIB_ValeurAbonnement = sBuf
crtq est une btleCaractéristique
crtq.ChangementValeur()
Syntax

Asking to be notified whenever the value of a characteristic changes Hide the details

<Characteristic>.ChangeOfValue([<WLanguage procedure>])
<Characteristic>: btleCharacteristic variable
Nom de la variable de type btleCaractéristique correspondant à la caractéristique à manipuler.
<WLanguage procedure>: Name of the WLanguage procedure
Nom de la procédure WLangage (appelée "callback") appelée lorsqu'une caractéristique change sur l'appareil. Pour plus de détails sur cette procédure, consultez Paramètres de la procédure utilisée par la fonction <btleCharacteristic variable>.ChangeOfValue.

Stopping the detection regarding the change of characteristic value Hide the details

<Characteristic>.ChangeOfValue()
<Characteristic>: btleCharacteristic variable
Nom de la variable de type btleCaractéristique correspondant à la caractéristique à manipuler.
Related Examples:
WM Bluetooth 4 Cross-platform examples (WINDEV Mobile): WM Bluetooth 4
[ + ] This example explains how to use the Bluetooth Low Energy functions (Bluetooth LE): BTLExxx.

It is an application allowing you to find the nearby BTLE devices, to connect to them and to interact with the proposed services.
Component: wd300android.aar
Minimum version required
  • Version 24
Comments
Click [Add] to post a comment

Last update: 07/10/2024

Send a report | Local help