Quick fix for NetworkOnMainThreadException
You could change it to: android:targetSdkVersion=”9″ API 10 corresponds to honeycomb, while 9 is gingerbread. This behavior is only seen in APIs 10 and above. However, I would advise against this. Instead, you should move any long running operations, or operations with the possibility of running for long into a background thread, like an AsyncTask. … Read more