Good morning everyone,
I'm new to both this forum and block programming of Android apps, for practice I'm creating a simple app that displays the content of an external website.
Furthermore, for a "redundancy" aspect, I wanted there to be a check of the status of the web link at startup and if it did not respond correctly, it would switch to the second web link.
I found what user @TIMAI2 created in his explanation of this useful and logical: Check if the link is active, if not, go to the next one
Now however, I have 2 big problems that I can't understand and solve.
The first: "CustomWebView.GoToUrl" doesn't seem to work... I always get just a white screen.
What am I doing wrong? It seemed logical to me to go and get the URL present in view2.url.
The second: if the first domain link is non-existent the app doesn't seem to do anything, I waited more than 5 minutes but the "Link No good" message never appeared.
I thought it might be a problem with the certificate (rightly if a domain is down or non-existent the SSL certificate could/would be missing)
By doing this I see the error
Error 1001: Unable to get a response with the specified URL: https://fakedomain.example.com, but it doesn't go to the second link.
How can I solve this problem? With a timer?
I have never used them and I wouldn't know how to set them and position them inside the blocks already created.
exactly, so in Screen.Initialize it is still empty (1)
and later (2) it will be set
so you have to move the GoToUrl block into the Web.GotText event after setting the url
But you first use the web component to check. If the link is fine... so what happens, if this is not the case? And only use the GoToUrl block after you found out, that the link is fine
You might want to provide an updated screenshot of your relevant blocks
Did you reset the counter to 0 before testing again?
Are there valid links available in your list?
Did you get twice the notification "Link no good"?
Taifun
post an updated screenshot of your blocks and let us know, which messages you get displayed... you have to find out, which events get triggered...
it might be better to use a label to debug and join the existing label text together with the new message, because the notifier might display messages not in the order you are receiving them
example: just call procedure debug like this in your blocks instead of using the notifier