I am using HttpURLConnection
's connect method but it returns null
.
no other message no printstack just null.
URL url = new URL("http://whatever");
URLConnection urlConnection = url.openConnection();
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
In above also it returns the null
Don't know why this comes. But I cant connect to net.
i also tried with HttpURLConnection and urlconnection both are different example.