I'm looking to make it clear in my app when the user is not connected to the database, whether that be due to no internet connection on the device or any other means.
I have come up with the following idea and would like any feedback, I feel like this could be unnecessary extra work for the app and the jRDC2 server.
If there are any better ways to achieve this then I will welcome the ideas.
I have come up with the following idea and would like any feedback, I feel like this could be unnecessary extra work for the app and the jRDC2 server.
If there are any better ways to achieve this then I will welcome the ideas.
B4X:
Sub Testconnection
Dim j As HttpJob
j.Initialize("", Me)
j.Download("http://192.168.1.21:17178/test")
j.GetRequest.Timeout = 1000
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
status.Color = Colors.Green
Else
status.Color = Colors.Red
End If
j.Release
Sleep(5000)
Testconnection
End Sub