PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Various
  • Required versions
  • Required permissions
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
Returns the list of accessible Bluetooth Low Energy devices.
Versions 27 and later
Windows This function is now available for WINDEV applications in Windows.
New in version 27
Windows This function is now available for WINDEV applications in Windows.
Windows This function is now available for WINDEV applications in Windows.
Example
BTLEListDevice(ProcDétectePériph)
...
 
INTERNAL PROCÉDURE ProcDétectePériph(UnPériph)
// Traitement de UnPériph
END
Syntax
BTLEListDevice(<WLanguage procedure> [, <Timeout>])
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called to list the devices. This procedure is used to get information about the devices found.
This procedure has the following format:
PROCEDURE <Nom de la procédure>(<Périphérique>, <Intensité du signal>)

where:
  • <Device> is a btleDevice variable corresponding to the connected device.
  • Versions 22 and later
    <Signal intensity> is an integer corresponding to the intensity of signal expressed in decibel per meter.
    New in version 22
    <Signal intensity> is an integer corresponding to the intensity of signal expressed in decibel per meter.
    <Signal intensity> is an integer corresponding to the intensity of signal expressed in decibel per meter.
If the procedure returns False, the monitoring of accessible devices will be immediately stopped.
<Timeout>: Optional integer or optional Duration
Timeout for the search (in seconds). This parameter can correspond to:
  • an integer corresponding to the number of seconds,
  • a Duration variable,
  • Versions 23 and later
    the duration in a readable format (e.g., 1 s).
    New in version 23
    the duration in a readable format (e.g., 1 s).
    the duration in a readable format (e.g., 1 s).
If this parameter is not specified, the default time-out is set to 10 seconds.
Remarks

Various

If the BTLEListDevice function is called when an analysis is already in progress, the previous analysis will be stopped and a new analysis will be started.

Required versions

  • Android Bluetooth Low Energy WLanguage functions are only available on devices with Android 4.3 or later (api level 18).
    • A fatal error occurs if the function is used with an earlier system version.
    • To determine the version of Android the application is running on, use SysAndroidVersion.
  • iPhone/iPadIOS WidgetMac Catalyst The WLanguage Bluetooth Low Energy functions are available for the devices running iOS 9.
  • Versions 27 and later
    Windows Bluetooth Low Energy WLanguage functions are only available on:
    • PCs that support at least Bluetooth Low Energy 5.
    • PCs using a Blutooth dongle supporting Bluetooth Low Energy version 5 or higher.
    New in version 27
    Windows Bluetooth Low Energy WLanguage functions are only available on:
    • PCs that support at least Bluetooth Low Energy 5.
    • PCs using a Blutooth dongle supporting Bluetooth Low Energy version 5 or higher.
    Windows Bluetooth Low Energy WLanguage functions are only available on:
    • PCs that support at least Bluetooth Low Energy 5.
    • PCs using a Blutooth dongle supporting Bluetooth Low Energy version 5 or higher.
Android

Required permissions

The call to this function modifies the permissions required by the application.
Required permissions :
  • BLUETOOTH: this permission allows the applications to connect to the Bluetooth services.
  • Versions 25 and later
    ACCESS_COARSE_LOCATION: this permission allows an application to access an undefined location (Cell-ID, WiFi).
    New in version 25
    ACCESS_COARSE_LOCATION: this permission allows an application to access an undefined location (Cell-ID, WiFi).
    ACCESS_COARSE_LOCATION: this permission allows an application to access an undefined location (Cell-ID, WiFi).
Android 10 specific case: Android 10 has implemented a new permission for the functions that allow locating the device: ACCESS_BACKGROUND_LOCATION.
This permission allows using the function when the application is in the background.
When this permission is added to the application, a window allows the user to:
  • allow access to the device location while the application is in the background,
  • allow access to the location only while the application is in use,
  • deny access to the location.
The user can also change these permissions at any time in the Android settings.
Android 11 specific case: This function requires the ACCESS_BACKGROUND_LOCATION permission to access the device's location.
This permission allows using the function when the application is in the background.
If the application needs to use background location:
  • Manually add the "ACCESS_BACKGROUND_LOCATION" permission in the Android application generation wizard.
  • Explicitly request background location permission with PermissionRequest. For example:
    PermissionRequest(permBackgroundLocation, Callback)
    INTERNAL PROCÉDURE Callback(p is Permission)
    IF p.Granted THEN
    // Functions that require background location access can be used
    END
    END
A window allows users to:
  • allow access to the device location while the application is in the background,
  • allow access to the location only while the application is in use,
  • deny access to the location. The user can also change these permissions at any time in the Android settings.

Remarks:
  • Follow Google's guidelines for applications that require background location access. For more details, see https://support.google.com/googleplay/android-developer/answer/9799150. If these conditions are not met (especially user information requirements), applications may not be accepted for publication on Google Play.
  • The background location permission should only be requested if the location permission has been granted. Otherwise, PermissionRequest will fail.
  • If the option chosen by the user for the background location access request is more restrictive than the option chosen for the location access request, the application will be automatically restarted.
  • On devices running Android 10 or earlier, if location permission has been granted to the application, the background location permission will be granted without displaying a window.
Business / UI classification: Business Logic
Component: wd270com.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment