I'm in the process of upgrading an old app (originally from 2015) and changing a few things within the app itself.
Everything seems to be working OK accept the internet connection (maybe).
The reason for the need internet is I'm implementing CloudRail into my app and it will not Initialize. The line below is in Sub Activity_Create
I'm using the following to check for an internet connection:
and get the following from the Logs:
** Activity (main) Pause, UserClosed = false **
Ignoring event: txtclient_focuschanged
** Activity (main) Resume **
DISCONNECTED
UNKNOWN
======= Response ========
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=34.6 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 34.639/34.639/34.639/0.000 ms
======= Error ===========
======================
DISCONNECTED
UNKNOWN
======= Response ========
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=30.3 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 30.388/30.388/30.388/0.000 ms
======= Error ===========
======================
So there is an internet connection but the GetDataState and GetNetworkType cannot see that for some reason.
This App has used the internet before but now does not for some reason.
Any ideas gratefully received.
Everything seems to be working OK accept the internet connection (maybe).
The reason for the need internet is I'm implementing CloudRail into my app and it will not Initialize. The line below is in Sub Activity_Create
B4X:
cr.Initialize("DCPData","5a033652d052b96XXXXXXXX")
I'm using the following to check for an internet connection:
B4X:
Sub CheckConnection As Boolean
'Requires Phone Library
Dim p As Phone
Log(p.GetDataState)
Log(p.GetNetworkType)
Dim Response, Error As StringBuilder
Response.Initialize
Error.Initialize
'Ping Google DNS - if you can't reach this you are in serious trouble!
p.Shell("ping -c 1 8.8.8.8",Null,Response,Error)
Log("======= Response ========")
Log(Response)
Log("======= Error ===========")
Log(Error)
Log("======================")
If Error.ToString="" Then
Return True
Else
Return False
End If
End Sub
and get the following from the Logs:
** Activity (main) Pause, UserClosed = false **
Ignoring event: txtclient_focuschanged
** Activity (main) Resume **
DISCONNECTED
UNKNOWN
======= Response ========
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=34.6 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 34.639/34.639/34.639/0.000 ms
======= Error ===========
======================
DISCONNECTED
UNKNOWN
======= Response ========
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=30.3 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 30.388/30.388/30.388/0.000 ms
======= Error ===========
======================
So there is an internet connection but the GetDataState and GetNetworkType cannot see that for some reason.
This App has used the internet before but now does not for some reason.
Any ideas gratefully received.
Last edited: