Hello. 
As most part of developers — I am too lazy to do some hard changes from version to version. First painfull step for me as a developer was Android 6 and runtime permissions. But that is in the past now.

For this publication i choose new changes in Android Oreo. You can find more here. All the articles with solutions about how to handle that in easy way was telling something like ‘Convert your service to JobIntentService and use it with enqueueWork().

Cool.. But if we take a look at CommandProcessor, we will see that it is stopped right after onHandleWork(). This is happening because IntentService is built for some easy operations such as : delivering some events, starting other services etc.

while ((work = dequeueWork()) != null) {
if (DEBUG) Log.d(TAG, "Processing next work: " + work);
onHandleWork(work.getIntent());
if (DEBUG) Log.d(TAG, "Completing work: " + work);
work.complete();
}
//Work
@Override
public void complete() {
if (DEBUG) Log.d(TAG, "Stopping self: #" + mStartId);
stopSelf(mStartId);
}

That solutions doesn’t helped me at all. This is why i was testing all this cases and searching easy way to use my services with Android O … And i found it. 
For some reasons it is not possible to start services from context provided by JobIntentService, but you can always ask for application context.

Good, we have application context now. But we still can’t run service because of limitations. And guess what ? This limitation works only when we trying to startService, and if you will try to bindService, it will work. But in this case service will be only bounded and you should also implement ServiceConnection and call required method ( onHandleWork() or onHandleIntent() or your own method).

By doing all this stuff i wrote a small and simple library which will do it all for you. This library also allows you to not declare\create your service at all. 
Check it out here

Some example how you can use it :

//No need to create classes and add manifest declarations

ServiceManager.runService(context, () -> {Logg.e(TAG,"Some Action");},true);

//if you have already prepared service you can us it as :
ServiceManager.runService(context, GeofenceTransitionsIntentService.class);

//or if you need to add some data or actions you can use it like :
Intent geo = new Intent(context, GeofenceTransitionsIntentService.class);
geo.setAction(GeofenceTransitionsIntentService.ACTION_REQUEST_LOCATIONS);
ServiceManager.runService(context, geo);

In order to use it as last two ways — your service should extend CompatService

public abstract class CompatService extends JobIntentService

Example project could be found here 
Getting back from what I am started “First painfull step for me as a developer was Android 6”. You can also check this tool .

Hope this post was helpful.