Giter Site home page Giter Site logo

Comments (5)

nikushaa991 avatar nikushaa991 commented on June 12, 2024 1

OnTaskRemoved does get called, pasted your code directly into DemoPlaybackService, but it didn't fix the issue

from media.

Dolakrishnan-Dev avatar Dolakrishnan-Dev commented on June 12, 2024 1

Hi @marcbaechinger @nikushaa991 Any Update on issue!!!
Where Media Session Service still remain Even When the App is Terminated during Playback.

from media.

marcbaechinger avatar marcbaechinger commented on June 12, 2024

Thanks! I believe this is a duplicate of #805

You can verify if this is the same issue by checking whether onTaskRemoved is actually called or not. If it's a duplicate, the onTaskRemoved callback is not called which is the reason why playback continues.

from media.

nikushaa991 avatar nikushaa991 commented on June 12, 2024

The music playback ends correctly, or did I misunderstand? I'll check if onTaskRemoved gets called in several hours, although I believe it does get called

from media.

marcbaechinger avatar marcbaechinger commented on June 12, 2024

If you try and you see it is called. Can you try to instead of calling pauseAllPlayersAndStopSelf to release all sessions and then call stopSelf directly?

In the demo app with a single session that would be:

  override fun onTaskRemoved(rootIntent: Intent?) {
    mediaLibrarySession.release()
    stopSelf()
  }

The reason is if that would help, then you have a controller that is still bound to the service when onTaskRemoved is called. Releasing the session would release all Media3 controller as well that potentially are bound to the service.

from media.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.