title: How do i remove a foreground notification in Android Lollipop?
body: <p>I'm looking to stop/dismiss a foreground notification for a service for a mediaplayer, much similar to Google's implementation for Google Music. </p>
  
  <p>For instance in Google Music, if you are playing music then the the notification cannot be swiped away. However if you pause the music it can. </p>
  
  <p>This is completely different to how it is implemented on Android 4.4, where the notification starts only  when you leave the app and removes itself when you go back into the app. I can't see how to implement this either considering the requirements for a service to have a notification. </p>
  
  <p>Any help would be much appreciated. </p>