I am trying to show notification for an RSS feed in my android application. the background service works fine in some mobile. but the problem is Huawei phone always kills the background service. I have tried many solutions in the last 5 days, none of them is working. When the app is closed, service is killed immediately.
I have tried,
- making the service sticky.
- using internet service which runs after regular interval.
- use the foreground server.
- restart service onDestroy event.
- using alarm manage to restart the service and many more.