Here is my code:
URL url = new URL("http://www.bing.com/"); URLConnection urlConnection = url.openConnection(); BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close();
In the manifest, I have the following:
<permission android:name="android.permission.INTERNET"></permission>
It is outside the application tab, but inside the manifest tag.
And the error I get is this:
java.net.SocketException: Permission denied (maybe missing INTERNET permission)
Really not sure why I get this error when I have permission on the Internet. This is a bit of a dead end!
Thanks!
source share