When I run this code from Java project it works fine.
InetAddress ia=null;
try {
ia = InetAddress.getByName("www.google.com");
} catch (UnknownHostException e) {
e.printStackTrace();
}
System.out.println(ia.getHostAddress());
When i try the same code from emulator (already tried few versions) I'm getting UnknownHostException. Internet works fine on emulator and I'm able to connect to IP address like "93.86.230.251" but never to hostname "something.org".
Please help