In my application I am using service to run background services continuously even the app removes from recent apps list. But the service stopped if I remove the app from recent apps list. Can any one gives me the solution?
Thanks, Sekhar
In my application I am using service to run background services continuously even the app removes from recent apps list. But the service stopped if I remove the app from recent apps list. Can any one gives me the solution?
Thanks, Sekhar
you have to make and show a notification until your service is running, use below code :
startForeground(id, notify.build());
for more information check example project in here . or maybe your problem is like that .
good luck.
Start service by returning START_REDELIVER_INTENT
onStartCommand of service to continuously run your service see my answer here.
And if you never have worked on service before then i suggest you to read Service documentation first so you will get more idea and clarification : refer this doc