I am using this code to fetch my changelog from the net.
InputStream content = null;
try {
URL url = new URL(\"http://dreamhawk.b
Well, why won't you use the WebClient? (usage: https://gist.github.com/2906703), you don't really need to mess up with the StrictMode Thread Policy. If google thought it was important to change it, who am I to disagree.
I know in android 3.0 network connection on the main thread isnt permitted.
StrictMode is turned on automatically. Im sure it is the same for 4.0
To fix the issue, you must perform the network connection on a separate thread... for example, using an AsyncTask
.
Read this blog post on the subject: