Skip to content

Asynchronously connect to media3 controllers #2643

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nift4
Copy link
Contributor

@nift4 nift4 commented Jul 23, 2025

In order to migitate an ANR on a slow device:

      at android.os.BinderProxy.transactNative (Native method)
This binder call may be taking too long, causing the main thread to wait and triggering the ANR. [Learn more](https://developer.android.com/topic/performance/anrs/find-unresponsive-thread#slow-binder)
      at android.os.BinderProxy.transact (BinderProxy.java:590)
      at android.app.IActivityManager$Stub$Proxy.bindIsolatedService (IActivityManager.java:6868)
      at android.app.ContextImpl.bindServiceCommon (ContextImpl.java:2140)
      at android.app.ContextImpl.bindService (ContextImpl.java:2037)
      at android.content.ContextWrapper.bindService (ContextWrapper.java:827)
      at androidx.media3.session.MediaControllerImplBase.requestConnectToService (MediaControllerImplBase.java:2559)
      at androidx.media3.session.MediaControllerImplBase.connect (MediaControllerImplBase.java:216)
      at androidx.media3.session.MediaController.<init> (MediaController.java:612)
      at androidx.media3.session.MediaController$Builder.buildAsync (MediaController.java:378)
      at org.akanework.gramophone.ui.MediaControllerViewModel.onStart (MediaControllerViewModel.kt:50)
      at androidx.lifecycle.DefaultLifecycleObserverAdapter.onStateChanged (DefaultLifecycleObserverAdapter.kt:25)

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.

2 participants