I am trying to data from a server. Sometimes my code fails due to an UnknownHostException. Why is that? What is the cause of this problem?
UnknownHostException
An UnknownHostException indicates the host specified couldn't be translated to an IP address. It could very well be a problem with your DNS server.