Internet do not work in Android 4
<p>I run the same code in Android 2.3.5 and in Android 4. But in the version 4, the internet seems to be not working. But when i check the browser in the phone it works. </p>

<pre><code>HttpGet httpget = new HttpGet("http://www.blah.com/?"+paramString);
            try {
                HttpResponse response = httpclient.execute(httpget);
                HttpEntity entity = response.getEntity();
                //------- scrape data
                if (entity != null) {
</code></pre>

<p>and following is the error log</p>

<pre><code>06-06 12:25:48.685: E/AndroidRuntime(7972): FATAL EXCEPTION: main
06-06 12:25:48.685: E/AndroidRuntime(7972): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.superhub.matkahupi/com.superhub.matkahupi.AutodetectedTripsActivity}: android.os.NetworkOnMainThreadException
06-06 12:25:48.685: E/AndroidRuntime(7972):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at android.app.ActivityThread.access$600(ActivityThread.java:122)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at android.os.Looper.loop(Looper.java:137)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at android.app.ActivityThread.main(ActivityThread.java:4340)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at java.lang.reflect.Method.invokeNative(Native Method)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at java.lang.reflect.Method.invoke(Method.java:511)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at dalvik.system.NativeStart.main(Native Method)
06-06 12:25:48.685: E/AndroidRuntime(7972): Caused by: android.os.NetworkOnMainThreadException
06-06 12:25:48.685: E/AndroidRuntime(7972):     at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1084)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at java.net.InetAddress.getAllByName(InetAddress.java:220)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
06-06 12:25:48.685: E/AndroidRuntime(7972):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
</code></pre>
