I need to run a third-party open source program that raises a NetworkOnMainThreadException. According to the SDK link, this is done only for applications targeting the Honeycomb SDK or higher. Applications targeting earlier versions of the SDK can create networks in their main event loop threads.
In the first step, I just want to run the program without changing the source. So, I changed the line in AndroidManifesr.xml:
android: targetSdkVersion = "15"
in
android: targetSdkVersion = "10"
However, this does not help, and the program throws a NetworkOnMainThreadException anyway. How can I make this work? I am trying to run a program on the Google API Android emulation (level 16).
android networkonmainthread network-programming
Alex f
source share