Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove useless service connection #143

Merged
merged 3 commits into from
Jun 9, 2023
Merged

Conversation

StaehliJ
Copy link
Contributor

@StaehliJ StaehliJ commented Jun 9, 2023

Description

Remove useless abstraction class for MediaSessionService and MediaLibraryService connection.

Changes made

  • Remove MediaServiceConnection
  • Remove MediaControllerConnection
  • Remove MediaBrowserConnection

To connection MediaController or MediaBrowser refer to the official documentation:

Sample:

val sessionToken = SessionToken(application, ComponentName(application, YourMediaBrowserService::class.java))
val listenableFuture = MediaBrowser.Builder(application, sessionToken).setListener(this).buildAsync()

// On view create

listenableFuture.addListener({
    setMediaBrowser(listenableFuture.get()
)}, MoreExecutors.directExecutor())

// Destroy view
MediaController.release(listenableFuture)

Checklist

  • Your branch has been rebased onto the main branch.
  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).
  • All pull request status checks pass.

@StaehliJ StaehliJ marked this pull request as ready for review June 9, 2023 09:16
@StaehliJ StaehliJ merged commit e114da6 into main Jun 9, 2023
@StaehliJ StaehliJ deleted the remove-useless-service-connection branch June 9, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant