What is the proper way to stop a service running as foreground

  1. From your activity, call startService(intent) and pass it some data representing a key to stop the service.
  2. From your service, call stopForeground(true)
  3. and then stopSelf() right after it.

Leave a Comment