I have an app that goes out to a website to grab XML for processing. This process is in a separate thread and works fine when I have 3G or WiFi available. I also have code that checks signal before actually running the thread so it won’t attempt with no connectivity.
During my testing, I walked into a building that blocked all signal so the process started while I was outside and had signal but when I went inside the signal dropped and my Progress dialog just kept running, I had to manually shut the program down to get it to recover.
Is there a good way to deal with this without requiring the user to manually shut down the app if this situation happens?
Supply timeout parameters to your
HttpClientand catch SocketTimeOutException