Conversation
Mudit200408
pushed a commit
to Mudit200408/airsync-android
that referenced
this pull request
May 23, 2026
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.
This pull request introduces support for a local WebDAV server in the app, allowing users to access their device's files over the network when certain conditions are met. It adds user-facing controls for enabling file access, implements the WebDAV server using Ktor, and integrates the server's lifecycle with the app's sync service and device state.
WebDAV Server Integration:
WebDavServerclass using Ktor, which exposes the device's external storage via WebDAV on port 9081. The server supports PROPFIND, GET, HEAD, and OPTIONS methods, providing directory listings and file downloads for compatible clients. (app/src/main/java/com/sameerasw/airsync/utils/WebDavServer.kt)app/build.gradle.kts)Settings and User Preferences:
file_access_enabled) to control whether the WebDAV server is enabled. This includes repository, DataStore, and UI support, as well as a toggle in the settings screen. (DataStoreManager.kt,AirSyncRepository.kt,AirSyncRepositoryImpl.kt,UiState.kt,SettingsView.kt,AirSyncViewModel.kt) [1] [2] [3] [4] [5] [6] [7] [8] [9]Service Lifecycle and Sync Integration:
AirSyncServicenow starts and stops the WebDAV server based on the new preference and the connection state of a "Plus" device. It monitors these requirements reactively and ensures the server is only running when appropriate. (AirSyncService.kt) [1] [2] [3] [4] [5] [6] [7] [8]These changes provide users with a secure and convenient way to access their files via WebDAV, while ensuring the server is only active when explicitly enabled and a compatible device is connected.