1

NetworkOnMainThreadException occurs although my network service is declared in its own thread?

view story
linux-howto

http://stackoverflow.com – My service uploads some files in the background and its declared like this in my manifest <service android:name="uploader.services.AttachService" android:icon="@drawable/loading_icon" android:label="@string/attachServiceName" android:process=":attachServiceBackground" /> On Android 4.1.1 it occurs a NetworkOnMainThreadException but I do not know why. I know that since honeycomb it is not allowed to do networking on the main thread, thats why the service will run in its own thread. Actually I am starting the service my activity like this s (HowTos)