I encountered this problem too, reconnecting the WiFi can solve this.
For us ,we can check if the phone can resolve the host to IP when we start application. If it cannot resolve, tell the user to check the WiFi and then exit.
I hope it helps.
More Related Contents:
- Why is my app is crashing while using async task?
- Download a file with Android, and showing the progress in a ProgressDialog
- How to check internet access on Android? InetAddress never times out
- How to call a SOAP web service on Android [closed]
- Inner class can access but not update values – AsyncTask
- How do I return a boolean from AsyncTask?
- The AsyncTask API is deprecated in Android 11. What are the alternatives?
- Return a value from AsyncTask in Android [duplicate]
- Android – Setting a Timeout for an AsyncTask?
- How one interface can be used for different background android tasks?
- RxJava instead of AsyncTask?
- Return data from AsyncTask class
- Parsing ksoap2 response
- Attempt to invoke virtual method ‘void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)’ on a null object reference
- Can I chain async task sequentially (starting one after the previous asynctask completes)
- AsyncTask.executeOnExecutor() before API Level 11
- How to use parameters with HttpPost
- How to call a RESTful web service from Android?
- Android: How to run asynctask from different class file?
- Using AsyncTask with passing a value
- javax.net.ssl.SSLException: SSL handshake aborted Connection reset by peer while calling webservice Android
- How to use AsyncTask
- How to query a web service via POST request in Android?
- Asynctask: pass two or more values from doInBackground to onPostExecute
- How to handle return value from AsyncTask
- Why does ArrayIndexOutOfBoundsException occur and how to avoid it in Android? [closed]
- How to return a DocumentSnapShot as a result of a method?
- Fill fields in webview automatically
- Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller
- How can I profile my Android app? [closed]