Page 1 of 1
App doesn't loading anything
Posted: Fri May 29, 2020 12:23 pm
by Alexeich
Hello. I'm testing my app in cases of no internet, and if I start it with no internet I normally receive an error in ChromiumMainLoadError (ERR_INTERNET_DISCONNECTED), start timer and everything is ok.
But if I disconnect my internet few seconds later after app starting, I get no errors, see only white screen and nothing happening more, even after internet is on again. Tell me please, how to solve this situation?
Re: App doesn't loading anything
Posted: Fri May 29, 2020 12:55 pm
by salvadordf
Hi,
Try using a timeout for your requests and call
InternetGetConnectedState to see if you have Internet connection :
https://stackoverflow.com/questions/223 ... connection
https://stackoverflow.com/questions/325 ... ith-delphi
Re: App doesn't loading anything
Posted: Fri May 29, 2020 1:36 pm
by Alexeich
salvadordf wrote: Fri May 29, 2020 12:55 pm
Try using a timeout for your requests and call
InternetGetConnectedState to see if you have Internet connection
Thanks, but you mean I can specify a timeout for my LoadURL request, or I should use timer to check had my page been loaded?
Re: App doesn't loading anything
Posted: Fri May 29, 2020 1:44 pm
by salvadordf
You can use a simple TTimer or you can also use the
Network List Manager (NLM) to get network availability events in your application :
https://theroadtodelphi.com/2015/10/28/ ... om-delphi/
I haven't tried the NLM but it looks very promising.
Re: App doesn't loading anything
Posted: Fri May 29, 2020 2:16 pm
by Alexeich
salvadordf wrote: Fri May 29, 2020 1:44 pm
You can use a simple TTimer
Eh, I hoped I could avoid checking my page loaded fully and normally)
Thank you.