PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Visible radio and connection request
  • Required permissions
  • Limitation
  • Application in the background: Android 10 specific case
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
BTChangeVisibility (Function)
In french: BTChangeVisibilité
Changes the visibility of a Bluetooth radio.
Remark: A Bluetooth radio corresponds to a Bluetooth transmitter. This transmitter can correspond to a Bluetooth USB key or it can be an element included in a computer (laptop for example).
Versions 16 and later
Android This function is now available for Android applications.
Android Caution:
  • Bluetooth functions are not available in the Android emulator.
  • The management of Bluetooth is available from Android 2.0.
New in version 16
Android This function is now available for Android applications.
Android Caution:
  • Bluetooth functions are not available in the Android emulator.
  • The management of Bluetooth is available from Android 2.0.
Android This function is now available for Android applications.
Android Caution:
  • Bluetooth functions are not available in the Android emulator.
  • The management of Bluetooth is available from Android 2.0.
Example
bVisible is boolean
// Identifier of Bluetooth radios listed in a Table control
nRadioID is int
nRadioID = TABLE_Radios.COL_ID[TABLE_Radios]
// Checks whether the selected radio is visible
bVisible = BTIsVisible(nRadioID)
// Display
IF bVisible = True THEN
Trace("Visible")
ELSE
Trace("Not visible")
END
// Change the visibility
BTChangeVisibility(nRadioID, NOT bVisible)
Syntax
Reports and QueriesWindowsAjaxUser code (UMC)

Syntax that can be used in Windows Hide the details

<Result> = BTChangeVisibility(<Radio identifier> , <New status>)
<Result>: Boolean
  • True if the change of visibility was successfully performed,
  • False otherwise. ErrorInfo returns more details about the problem.
<Radio identifier>: Integer
Identifier of Bluetooth radio to use. This identifier is returned by BTListRadio.
<New status>: Boolean
  • True in order for the radio to become visible,
  • False in order for the radio to be hidden.
AndroidWindows Mobile

Syntax that can be used in Mobile and Android Hide the details

<Result> = BTChangeVisibility(<New status> [, <Duration>])
<Result>: Boolean
  • True if the change of visibility was successfully performed,
  • False otherwise. ErrorInfo returns more details about the problem.
<New status>: Boolean
  • True in order for the radio to become visible,
  • False in order for the radio to be hidden.
Versions 16 and later
Android The visibility cannot be disabled by programming. This deactivation is temporary.
New in version 16
Android The visibility cannot be disabled by programming. This deactivation is temporary.
Android The visibility cannot be disabled by programming. This deactivation is temporary.
<Duration>: Optional integer or optional Duration
Duration (in seconds) during which the device must be made visible. This parameter must be included between 1 and 300 seconds. By default, the visibility duration is set to 120 seconds.
This parameter can correspond to:
  • an integer corresponding to the number of seconds,
  • a Duration variable,
  • Versions 23 and later
    the direct indication of duration (1 s for example).
    New in version 23
    the direct indication of duration (1 s for example).
    the direct indication of duration (1 s for example).
Windows Mobile This parameter is ignored.
Remarks

Visible radio and connection request

A visible Bluetooth radio automatically accepts the connection requests. When BTChangeVisibility is used to make the radio visible, the call to BTChangeConnectivity is automatically performed.
Versions 16 and later
Android In Android, the visibility of the device in relation to the other Bluetooth devices is always temporary (up to 5 minutes). If BTChangeVisibility is used to make the device visible, a system dialog box will be displayed to ask for user confirmation.
Remark: This dialog box is imposed by the Android system and therefore it cannot be avoided.
Android confirmation box
New in version 16
Android In Android, the visibility of the device in relation to the other Bluetooth devices is always temporary (up to 5 minutes). If BTChangeVisibility is used to make the device visible, a system dialog box will be displayed to ask for user confirmation.
Remark: This dialog box is imposed by the Android system and therefore it cannot be avoided.
Android confirmation box
Android In Android, the visibility of the device in relation to the other Bluetooth devices is always temporary (up to 5 minutes). If BTChangeVisibility is used to make the device visible, a system dialog box will be displayed to ask for user confirmation.
Remark: This dialog box is imposed by the Android system and therefore it cannot be avoided.
Android confirmation box
Versions 16 and later
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.
New in version 16
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.
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.
WindowsWindows Mobile

Limitation

Only the Microsoft Bluetooth stack is supported by this function. To find out the stack used, call BTStack.
See Which stacks to use? for more details
Versions 25 and later
Android

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
BTChangeVisibility can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
New in version 25
Android

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
BTChangeVisibility can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
Android

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
BTChangeVisibility can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
Component : wd250com.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment