• Battery optimizations are turned on by default. It is possible the disabled restrictions might get revert after OS update or reboot:
  • Settings > Device Care > Battery > App power management
  • Disable Put unused apps to sleep
  • Remove your app from the list of Sleeping apps - list of apps not allowed to run on the background
  • Remove your app from the list of Deep sleeping apps - list of apps that can only work when you open them
  • Add your app to the list of Apps that won’t be put to sleep
  • Disable Auto-optimization
  • Warning: Make sure Put unused apps to sleep is disabled. Otherwise, Samsung will put your apps back to sleep after a few days (3 by default) even if you have woken them up manually!