Sensor simulator's NetworkOnMainThreadException
问题 I followed this instruction to debug my app on emulator using sensor simulator: http://code.google.com/p/openintents/wiki/SensorSimulator#How_to_use_the_in_your_application I completed all steps above, but in my case everything was not as simple as described in instructions. I got NetworkOnMainThreadException trying to connect, register listener etc. So I created async task to solve this problem. Now, I have the following: connection to simulator: @Override public void onCreate(Bundle