I am using Firebase Job Dispatcher and setting it up like described in https://github.com/firebase/firebase-jobdispatcher-android/blob/master/README.md.
The job to be scheduled is a http request. The http request could run while the app is on the foreground (the user is looking at it), or while the app is in the background/not started.
Should the http request (using the okhttp library) be put in a separate thread / asynchronous or can I just call it directly from the JobService?