Hi everyone,
I'm trying to get the result of this URL http://bot.whatismyipaddress.com/ which is a simple method to return the external IP address of a device.
There may well be an architectural/orchestration issue, but it's all just a bit strange, so if anyone has ideas, then I'm very happy to take advice.
Thanks in advance.
App starts in Main
Here is my code for modCLocalDevice:
... further down in the class...
My log file reads like this:
The JobDone code is in the Class definition for modCLocalDevice
I'm trying to get the result of this URL http://bot.whatismyipaddress.com/ which is a simple method to return the external IP address of a device.
There may well be an architectural/orchestration issue, but it's all just a bit strange, so if anyone has ideas, then I'm very happy to take advice.
Thanks in advance.
App starts in Main
B4X:
Sub Process_Globals
Dim gThisDevice As modCLocalDevice
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer.
ProgressDialogShow("Initialising application")
gThisDevice.Initialize
StartActivity("modActLogin")
Log("Welcome to " & Activity.Title)
End Sub
Here is my code for modCLocalDevice:
B4X:
Public Sub Initialize
'... a whole bunch of initialization code, setting
'private variables to get the local user account and other
' boring stuff
Log("Now Getting IP Addresses")
GetMyExternalIPAddress
End Sub
B4X:
Private Sub GetMyExternalIPAddress As String
Dim ThisReq As HttpJob
Dim sTarget = "http://bot.whatismyipaddress.com/" As String
ThisReq.Initialize("ExtIP",Me)
Log("XX: " & ThisReq.Download(sTarget))
End Sub
B4X:
** Activity (main) Create, isFirst = true **
Now Getting IP Addresses
XX:
Welcome to <<My App Name>>