Foreground service getting killed from Oreo
I have written a foreground service which is working properly for all OS version lower than Oreo. From Oreo application process is getting killed after 5 minutes of closing and removing the application from recents. As per android developer documentation for background execution limitations OS should not kill application for which a foreground service is running and notification is shown in notification window. As per guidelines on developer documentation. I followed below steps to start foreground-service. Foreground service is started with startForegroundService() method Within 5 sec after