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.
  • Firewall
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
InternetConnected (Function)
In french: InternetConnecté
Defines whether an Internet connection is enabled on the current computer.
Versions 19 and later
AndroidAndroid Widget iPhone/iPad Allows you to be notified when the status of the Internet connection changes.
New in version 19
AndroidAndroid Widget iPhone/iPad Allows you to be notified when the status of the Internet connection changes.
AndroidAndroid Widget iPhone/iPad Allows you to be notified when the status of the Internet connection changes.
Versions 17 and later
Android This function is now available for Android applications.
New in version 17
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android widget mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android widget mode.
Versions 19 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 19
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 20 and later
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 20
Universal Windows 10 App This function is now available for Windows Phone applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Connexion Internet active?
ResConnexion = InternetConnected()
IF ResConnexion = True THEN
Info("Une connexion Internet est active")
ELSE
Info("Aucune connexion Internet n'est active")
END
Syntax

Finding out whether an Internet connection is enabled Hide the details

<Result> = InternetConnected()
<Result>: Boolean
  • True if an Internet connection is enabled on the current computer,
  • False otherwise.
Versions 19 and later
AndroidAndroid Widget iPhone/iPad

Asking for a notification when the status of the Internet connection changes Hide the details

<Result> = InternetConnected([<WLanguage procedure>])
<Result>: Boolean
  • True if Procedure has been associated with the function InternetConnected,
  • False otherwise.
<WLanguage procedure>: Procedure name
WLangage procedure ("callback" procedure) called when the status of Internet connection changes.
This procedure has the following format:
PROCEDURE <Nom de la procédure>(<Etat>)
<Status> is an integer constant corresponding to the new status of the Internet connection.
It can take the following values:
networkDisconnectedThe network is disconnected or inaccessible.
networkEthernetThe Internet connection is performed by Ethernet.
networkMobileThe Internet connection is performed in mobile mode: edge, 2G, 3G, 4G, ...
networkWifiThe Internet connection is performed by Wi-Fi.

If the <Procedure WLanguage> parameter corresponds to an empty string (""), the Procedure WLanguage previously defined will no longer be called up..
New in version 19
AndroidAndroid Widget iPhone/iPad

Asking for a notification when the status of the Internet connection changes Hide the details

<Result> = InternetConnected([<WLanguage procedure>])
<Result>: Boolean
  • True if Procedure has been associated with the function InternetConnected,
  • False otherwise.
<WLanguage procedure>: Procedure name
WLangage procedure ("callback" procedure) called when the status of Internet connection changes.
This procedure has the following format:
PROCEDURE <Nom de la procédure>(<Etat>)
<Status> is an integer constant corresponding to the new status of the Internet connection.
It can take the following values:
networkDisconnectedThe network is disconnected or inaccessible.
networkEthernetThe Internet connection is performed by Ethernet.
networkMobileThe Internet connection is performed in mobile mode: edge, 2G, 3G, 4G, ...
networkWifiThe Internet connection is performed by Wi-Fi.

If the <Procedure WLanguage> parameter corresponds to an empty string (""), the Procedure WLanguage previously defined will no longer be called up..
AndroidAndroid Widget iPhone/iPad

Asking for a notification when the status of the Internet connection changes Hide the details

<Result> = InternetConnected([<WLanguage procedure>])
<Result>: Boolean
  • True if Procedure has been associated with the function InternetConnected,
  • False otherwise.
<WLanguage procedure>: Procedure name
WLangage procedure ("callback" procedure) called when the status of Internet connection changes.
This procedure has the following format:
PROCEDURE <Nom de la procédure>(<Etat>)
<Status> is an integer constant corresponding to the new status of the Internet connection.
It can take the following values:
networkDisconnectedThe network is disconnected or inaccessible.
networkEthernetThe Internet connection is performed by Ethernet.
networkMobileThe Internet connection is performed in mobile mode: edge, 2G, 3G, 4G, ...
networkWifiThe Internet connection is performed by Wi-Fi.

If the <Procedure WLanguage> parameter corresponds to an empty string (""), the Procedure WLanguage previously defined will no longer be called up..
Remarks
WINDEVReports and QueriesUser code (UMC)

Firewall

The InternetConnected function uses an ping request to test access to INTERNET. Therefore, the ping must be allowed by the security parameters of the network in order for the result of the function to be pertinent.
Remark: The ping is performed on the Google DNS (6 seconds, 1 attempt). The equivalent code is:
Ping("8.8.8.8", 6000, 1)
Versions 17 and later
AndroidAndroid Widget Required permissions
The call to this function modifies the permissions required by the application.
Required permission : ACCESS_NETWORK_STATE: this permission allows the applications to access information regarding the networks.
New in version 17
AndroidAndroid Widget Required permissions
The call to this function modifies the permissions required by the application.
Required permission : ACCESS_NETWORK_STATE: this permission allows the applications to access information regarding the networks.
AndroidAndroid Widget Required permissions
The call to this function modifies the permissions required by the application.
Required permission : ACCESS_NETWORK_STATE: this permission allows the applications to access information regarding the networks.
Versions 19 and later
AndroidAndroid Widget iPhone/iPad Change of connection status (syntax 2)
  • Call to the procedure:
    • iPhone/iPad The WLanguage procedure is called only when the network status changes. It is not called when the function InternetConnectedis called. It is necessary to call the function InternetConnected (without parameter) to know if the connection INTERNET is active or not.
    • AndroidAndroid Widget The Procedure WLanguage is automatically called when the InternetConnectedfunction is called.
  • Only one Procedure can be associated with the function InternetConnected. If the InternetConnected function is called multiple times with different Procedure names, the Procedure used for the report detection of the Internet connection will be replaced by the new Procedure specified.
  • AndroidAndroid Widget If the InternetConnected function is called from a secondary thread, the procedure will be called in the main the thread of the application.
New in version 19
AndroidAndroid Widget iPhone/iPad Change of connection status (syntax 2)
  • Call to the procedure:
    • iPhone/iPad The WLanguage procedure is called only when the network status changes. It is not called when the function InternetConnectedis called. It is necessary to call the function InternetConnected (without parameter) to know if the connection INTERNET is active or not.
    • AndroidAndroid Widget The Procedure WLanguage is automatically called when the InternetConnectedfunction is called.
  • Only one Procedure can be associated with the function InternetConnected. If the InternetConnected function is called multiple times with different Procedure names, the Procedure used for the report detection of the Internet connection will be replaced by the new Procedure specified.
  • AndroidAndroid Widget If the InternetConnected function is called from a secondary thread, the procedure will be called in the main the thread of the application.
AndroidAndroid Widget iPhone/iPad Change of connection status (syntax 2)
  • Call to the procedure:
    • iPhone/iPad The WLanguage procedure is called only when the network status changes. It is not called when the function InternetConnectedis called. It is necessary to call the function InternetConnected (without parameter) to know if the connection INTERNET is active or not.
    • AndroidAndroid Widget The Procedure WLanguage is automatically called when the InternetConnectedfunction is called.
  • Only one Procedure can be associated with the function InternetConnected. If the InternetConnected function is called multiple times with different Procedure names, the Procedure used for the report detection of the Internet connection will be replaced by the new Procedure specified.
  • AndroidAndroid Widget If the InternetConnected function is called from a secondary thread, the procedure will be called in the main the thread of the application.
Component: wd270com.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment