GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 25
→
WM [RESOLVIDO] Saber estado de Sinal do Telefone (Android)
WM [RESOLVIDO] Saber estado de Sinal do Telefone (Android)
Iniciado por Willian Fernando, out., 05 2016 5:01 PM - 1 resposta
Conecte-se…
Willian Fernando
#1
Membro registado
123 mensagems
Popularité : +46 (46 votes)
Publicado em outubro, 05 2016 - 5:01 PM
http://doc.pcsoft.fr/en-US/?1000020176
http://doc.pcsoft.fr/en-US/?1000020175
--
Atte. Willian Fernando
Denunciar
0
0
BOLLER
#2
Membro registado
3.659 mensagems
Popularité : +175 (223 votes)
Publicado em outubro, 06 2016 - 8:29 AM
MobileNetworkConnectionInfo (Function)
In French: RéseauMobileInfoConnexion
Returns information regarding the current connection to the data on the mobile network.
Note: This function cannot be used in the simulator and it will return 0 in this case.
Example
// Activation of the Wi-Fi if the signal intensity is strong enough to access the data
// via the mobile network
IF
MobileNetworkConnectionInfo
(
networkGSMSignal
) <
=
20
_AND_
WiFiStatus
(
) <
>
wifiEnabled
THEN
IF
YesNo
(
"The intensity of the GSM signal is not sufficient. Enable the Wi-Fi?"
)
THEN
WiFiActivate
(
)
END
END
Syntax
<Result> = MobileNetworkConnectionInfo(<Type of Information>)
<Result>: Character string
•Requested information.
•If several types of information are requested, each type of information is separated by a CR character (Carriage Return).
•The order in which the information is returned (if requested) is as follows:1.<Type of network>
2.<Operator>
3.<GSM signal>
4.<Roaming>
5.<Plane mode>
<Type of Information>: Integer
Requested information:
networkRoaming Roaming mode of data.
If this information is requested, <Result> is set to:
•1 if the current connection uses the data roaming
•0 otherwise.
networkAirPlaneMode Management of the plane mode.
If this information is requested, <Result> is set to:
•1 if the device is in plane mode.
•0 otherwise.
networkOperator Name of the network operator used.
Depending on the type of network or if the plane mode is enabled, this information may not be specified.
networkGSMSignal Intensity of the GSM signal included between 0 (no signal) and 100 (optimum signal).
This information is available on the devices running Android version 2.2 or later (api level
.
The intensity will be equal to 0 for the earlier versions of the system.
To find out the version of the Android system on which the application is run, use SysAndroidVersion.
networkType Type of network used to access the data on the mobile network.
Roaming mode of data.
If this information is requested, <Result> is set to:
•network2G: 2G network
•networkEdge: Edge network
•network3G: 3G network
•network4G: 4G network
•networkUnknown: Unknown network
Remarks
To get information about the WiFi connection, use WiFiConnectionInfo.
Android System Android (WINDEV Mobile): Android System
[ + ]
This application is a tutorial example presenting some of the new features of WINDEV Mobile for Android.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- WIFI
- Bluetooth
- Toast
- Progress Bar control
- 9-image mode
- Compass
- Accelerometer
- Camera control
- LED
- Vibrations
- Notifications
- Drawing functions
- Internet
Components
Android wd210android.jar
---------------
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.
Notes:
•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.WINDEV.com"
)
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:
networkConnected Connected.
networkConnectionInProgress Current connection.
networkDisconnected Offline.
Asking to be notified when the status of the connection to data changes on the mobile network Hide the details
<Result> = MobileNetworkStatus(<Procedure Name>)
<Result>: Integer constant
Status of the connection to data:
networkConnected Connected.
networkConnectionInProgress Current connection.
networkDisconnected Offline.
<Procedure Name>: Character string (with or without quotes)
WLangage procedure ("callback" procedure) called when the status of the 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:
networkConnected Connected.
networkConnectionInProgress Current connection.
networkDisconnected Offline.
If this parameter corresponds to an empty string (""), the notifications regarding the change of connection status will not be sent anymore.
Remarks
A change of connection status can occur when the type of network used changes : for example, when switching from 2G network to 3G network (or conversely).
To find out the type of network corresponding to the current connection, use MobileNetworkConnectionInfo.
Related Examples:
Android System Android (WINDEV Mobile): Android System
[ + ]
This application is a tutorial example presenting some of the new features of WINDEV Mobile for Android.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- WIFI
- Bluetooth
- Toast
- Progress Bar control
- 9-image mode
- Compass
- Accelerometer
- Camera control
- LED
- Vibrations
- Notifications
- Drawing functions
- Internet
Components
Android wd210android.jar
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Denunciar
1
1
→ Voltar para WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto