I have a Foreground Service and on Samsung devices android OS kills my Foreground Service after a week or two .
I have a fitness app that runs Foreground Service 24 hours and it will not be destroyed. In OnCreate() and OnStartCommand() method of a service i am calling (startForeground()) and also onDestroy Method I am running a Broadcast Receiver to restart my Foreground Service but every time OnDestroy Method is not called when OS kills your Service
I have checked and test every solution given in stackOverflow but did not Work.
Any Solution ...?