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?
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
App doesn't loading anything
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: App doesn't loading anything
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
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
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?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
- salvadordf
- Posts: 4575
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: App doesn't loading anything
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.
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
Eh, I hoped I could avoid checking my page loaded fully and normally)
Thank you.