SyntaxFix
Write A Post
Hire A Developer
Questions
If you are using the HttpURLConnection, call setConnectTimeout() as described here:
HttpURLConnection
setConnectTimeout()
URL url = new URL(myurl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setConnectTimeout(CONNECT_TIMEOUT);