I have looked through the relevant threads on the forum regarding checking connections. I have decided that the most reliable way will be to actually load a site (Like Erel has mentioned in a couple of threads, loading Google). To keep speed up and bandwidth down I have created a simple page on the Site that my app interacts that simply states 'OK'.
I'm trying to think how best to create a 'CanConnect' sub.
So Far I have
but then obviously the returned data gets dealt with in the JobDone event and so no way to test that and return true / false.....
What am I missing and how can I make this work?
cheers
I'm trying to think how best to create a 'CanConnect' sub.
So Far I have
B4X:
Sub CanConnect() As Boolean
Dim HttpAction As HttpJob
HttpAction.Initialize("CheckConnection", Me)
HttpAction.Download(Shared.GetSetting("h") & "/test/con.php")
End Sub
but then obviously the returned data gets dealt with in the JobDone event and so no way to test that and return true / false.....
What am I missing and how can I make this work?
cheers