Repository navigation
fix(network): request ACCESS_LOCAL_NETWORK for LAN servers on Android 17 - #2972
Open
ismael-ares wants to merge 1 commit into
Open
ismael-ares wants to merge 1 commit into
ismael-ares wants to merge 1 commit into
Conversation
Apps targeting SDK 37 can no longer reach the local network without the ACCESS_LOCAL_NETWORK runtime permission. PixelPlayer neither declared nor requested it, so connections to self-hosted Navidrome/Jellyfin servers on the LAN silently timed out and casting could not reach local devices. - Declare ACCESS_LOCAL_NETWORK in the manifest. - Ask for it before logging in to a Navidrome/Jellyfin server whose URL points to the local network (private/link-local/ULA address, .local host, or a host name resolving to one), and show a clear message if it is denied instead of waiting for the timeout. - On startup, ask for it when a saved Navidrome/Jellyfin server is on the LAN, covering users who logged in before updating or revoked it. - Include it in the permissions requested by the cast sheet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2895, fixes #2927. Also addresses the Android 17 report in #2287.
Since Android 17, apps targeting SDK 37 cannot reach the local network unless they hold the
ACCESS_LOCAL_NETWORKruntime permission (docs). PixelPlayer targets SDK 37 but neither declared nor requested it. As a result, connections to self-hosted Navidrome/Jellyfin servers on the LAN silently timed out (failed to connect to /192.168.x.x ... after 15000ms), and the permission can't be granted manually because it isn't declared.Changes
ACCESS_LOCAL_NETWORKin the manifest..localhost, or a host name that resolves to one of those. If the user denies it, show a clear message instead of waiting for the timeout. Public servers never trigger the prompt.LocalNetworkAccessTest).Testing
http://on the LAN shows the system "Nearby devices" prompt; after allowing it, login and playback work../gradlew :app:testDebugUnitTest --tests "*LocalNetworkAccessTest"passes.