Giter Site home page Giter Site logo

Comments (2)

aljohnston112 avatar aljohnston112 commented on July 20, 2024

I seem to have verified via debugging that the Activity, despite making another session token, does indeed connect to the MediaLibraryService that has been started by the application.

There is one weird thing that may be a bug and, if so, I can add an issue for it. When a controller calls setMediaItem, the session's onAddMediaItems is called. setMediaItems says that it clears the playlist, so how is onAddMediaItems supposed to know if the call was from setMediaItems or one of the addMediaItem(s) methods in which the playlist should not be cleared?

from media.

marcbaechinger avatar marcbaechinger commented on July 20, 2024

Android makes sure there is only a single instance of a given service running at the same time.

How is an external client supposed to know the ComponentName so they can connect to it? Are they able to find it via an Intent that matches the given actions declared in the intent-filter for the service?

Yes. An app can query the PackageManager for services that other apps have in their manifest when exported=true.

so how is onAddMediaItems supposed to know if the call was from setMediaItems or one of the addMediaItem(s) methods in which the playlist should not be cleared?

I think the library handles this for the user. There is Callback.onSetMediaItems() that by default delegates to onAddMediaItems and the calls player.setMediaItems(items, windowIndex, startPositionMs).

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.