Error handling with CustomWebView (Obsługa błędu i CustomWebView)

Wyświetlam film, którego adres jes w arkuszu googla. Symuluję brak internetu.
Używam komponentu CustomWebViev i na zdarzeniu OnErrorReceived odpisuję na label5 message , errorcode i url.
Sprawdzam czy odpisany message jest równy net::ERR_ADDRESS_UNREACHABLE lub net::ERR_NAME_NOT_RESOLVED i wyświetlam swój komunikat używając notifiera.
Problem: Jak zrobić aby nie wyświetał się dodatkowy komunikat. Stron internetowa jest niedostępna.
Nie można załadować strony.....


Can you check if url works in a browser?

Url is ok. I have simulated the situation when there is no internet connection. The problem is with error handling.

Please translate this into English.

The problem is : how to that additional error message ( from app2 inventor, I think )

The page ......could not be loaded because of net::ERR_NOT_RESOLVED
I would like to have my error message ONLY , that is this message displayed in pink color
The is no internet connection.
Please check your wifi or LTE and try again.
In case that internet connection is lost.

Please find the correction...
The problem is how to do that aditional error message will not be displayed.

You can hide the WebView when an error occurs. Then process the error message in background.

vknow360, Thank you very much for help. It was a very valuable tip. Now it works as I wanted.

1 Like