Fix local network access on Android 17 - #97
Open
Hunter-The-Furry wants to merge 1 commit into
Open
Conversation
Author
|
A few follow-up ideas I left out of this PR so it stays focused:
I left these out since they felt more like follow-up UX work than part of the actual connection fix. |
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.
What changed
Android 17 requires apps targeting SDK 37 to request local network access before connecting to devices on the LAN.
This adds the
ACCESS_LOCAL_NETWORKpermission and requests it at startup on Android 17+. Older Android versions keep the existing behavior.Why
Without the permission, connections to a local TrueNAS server can just time out even though the server is reachable from the browser.
This may also be the cause of #96 if that GrapheneOS device is up to date and running Android 17, since the reported symptoms are very similar.
Tested
Built and installed the GitHub debug APK on a physical Android 17 device and confirmed I can connect and log in to a local TrueNAS instance after granting the Local Network permission.
testGithubDebugUnitTestandassembleGithubDebugpass.lintGithubDebugstill fails on 3 existingUnusedMaterial3ScaffoldPaddingParametererrors in unrelated files. This change does not add any new lint warnings.