I run into a NetworkOnMainThreadException with my Android 3.0 app. Searching for a solution I found this, but if I understand this correctly, default setting would be that t
In Android Honeycomb StrictMode is enabled, turn it off adding the code on the onCreate() function...
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
}
StrictMode is turned on by default in Honeycomb.
See say link specifically penaltyDeathOnNetwork()
. I ran into a similar problem.