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

java.lang.SecurityException: Session rejected the connection request #54

Closed
toasterofbread opened this issue Jun 10, 2023 · 1 comment
Closed

Comments

@toasterofbread
Copy link
Owner

When creating a MediaController for the second time (as in when the service is already running) such as when opening the app after closing it, buildAsync() results in the above error.

I have no idea why this occurs. The Media3 demo works fine but I can't tell what the key difference in implementation is. I can work around this by using the first connection forever, not disconnecting it even when the app is closed, but this causes its own issues.

@toasterofbread
Copy link
Owner Author

Solved by using context.applicationContext
https://stackoverflow.com/a/8317874/13979722

toasterofbread added a commit that referenced this issue Jun 10, 2023
toasterofbread added a commit that referenced this issue Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant