79083934

Date: 2024-10-13 19:10:32
Score: 1.5
Natty:
Report link

The reason it is happening is because services continue running even if user press back, home or recent. service onDestroy() will be called when service is stopped by code internally by calling stopSelf() or stopService().

so, you can override lifeCycle onPause()/onStop()/onResume() methods for your activity where you start your service to call stopSelf()/stopServcie().

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: CoderAbt