I have a webview and when the internet is disconnected it displays an error message on iOS. I would like it to migrate to a screen, and on this screen when connected it goes back to the previous screen automatically. Is it possible to do this?
You can use this block
In the device drawer to check that device running the app is connected to the internet.
You can use the same block with a
timer to check every few seconds and decide what to do.
I Change Screen 1 for False. But not Working Too.
Try changing a label’s text value (“online” or “offline”) on each screen when the device is online. And also when the device is offline. Then test it and report back. If you can’t get it to work, post a link to your project and someone here can test it on their own device.
@Gustavo_Lima, also try using the “starts” event rather than the opens event.
I tested it with this code and I can see it working
Thanks for replys i try this now! @tatiang You asked me to post the project link, if you can take a look please, thank you very much.
I have tested the code I shared earlier on my phone and was switching the WIFI and mobile data on and off and see that the code gives the right message in the screen.
I only shared the code after having tested in myself.