1. Are you ready for the Galaxy S20? Here is everything we know so far!

binding a service to multiple activities

Discussion in 'Android Development' started by kilowog3000, Apr 7, 2019.

  1. kilowog3000

    kilowog3000 Lurker
    Thread Starter


    I'm developing a music player app, it's my first Android app ever so I'm navigating these waters. So far everything is going decently, a few hangups, etc., but still getting there.

    So my question: I have my music service playing and I need to control it from several screens. Think "Google Play" app, "Spotify", were you can do the normal pause, resume, next, prev, etc. from a main category page, a song detail page, and others. I did some googling, and I found the following reference on Stackoverflow:

    While it may seem legit enough, but one subcomment said this is a bad pattern to store variables in the Application itself, use persistence, etc. My question: Does the SO answer make sense, is it correct, or is there a better way I should do this?



Share This Page