In my app I've got a class that i use to get data from my server. It works fine in every Activity
that i made, but this time i want to use it in Service
subclass, which is (services) new to me in 100%.
I found an issue in this line:
InputStream inputStream = urlConnection.getInputStream();
This is a place when my web class fires Exception:
android.os.NetworkOnMainThreadException
Is there any major difference between using it in activities and services?