ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
MobileNetworkStatus (Function)
In french: RéseauMobileEtat
Returns the current status of the connection to data on the mobile network or asks to be notified when the status of the connection to data changes.
Remarks:
  • This function cannot be used in the simulator. In this case, it will always return 0.
  • This function does not affect the Wi-Fi connection but the connection via a telephony operator.
Example
IF MobileNetworkStatus() = networkConnected THEN
	BrowserRunApp("www.pcsoft.fr")
END
Syntax

Retrieving the status of the connection to data on the mobile network Hide the details

<Result> = MobileNetworkStatus()
<Result>: Integer constant
Status of the connection to data:
networkConnectedConnected.
networkConnectionInProgressConnecting.
iPhone/iPad This constant is not available.
networkDisconnectedDisconnected.

Asking to be notified when the status of the connection to data changes on the mobile network Hide the details

<Result> = MobileNetworkStatus(<WLanguage procedure>)
<Result>: Integer constant
Status of the connection to data:
networkConnectedConnected.
networkConnectionInProgressConnecting.
iPhone/iPad This constant is not available.
networkDisconnectedDisconnected.
<WLanguage procedure>: Procedure name
WLanguage procedure ("callback" procedure) called when the status of connection to data changes.
This procedure has the following format:
PROCEDURE <Procedure name>(<New status>)
<New status> is an integer constant corresponding to the new status of the connection to data:
networkConnectedConnected.
networkConnectionInProgressConnecting.
iPhone/iPad This constant is not available.
networkDisconnectedDisconnected.
If this parameter corresponds to an empty string (""), the notifications regarding the change of connection status will not be sent anymore.
Remarks
A change in connection status can contributor when the type of network used changes: for example, when switching from 2G to 3G or vice versa.
To find out the type of network corresponding to the current connection, use MobileNetworkConnectionInfo.
Related Examples:
WM System Cross-platform examples (WINDEV Mobile): WM System
[ + ] This application is an example of some of the features of WINDEV Mobile available for Android/iOS.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- Wi-Fi
- Bluetooth
- Toast
- Compass
- Accelerometer
- Camera control
- LED
- Vibration
- Notifications
- Drawing functions
- Internet
Component: wd300android.aar
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help