I understand that you need for Oreo not to block the background services, maybe looking at the part of the code where you implemented the service we can find the problem and they are not diverting the attention in the resolution.
I propose you to see this part of the code and solve the problem with what you already have, you don't have to pass the entire app to me, only that part, obviously what is necessary to be able to contextualize the issue and solve it.
Keep in mind that it is a matter of investigation and resolution of the problem, it is not as expensive an issue as I see in other competitors but not very cheap, since it takes time to research.
*** WARRANTY ***
1. Without requesting payment up to 100% satisfaction.
2. Always deliver the source code.