Skip to content

Web dav file access impl#111

Merged
sameerasw merged 2 commits into
developfrom
webDAV
May 21, 2026
Merged

Web dav file access impl#111
sameerasw merged 2 commits into
developfrom
webDAV

Conversation

@sameerasw
Copy link
Copy Markdown
Owner

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:

  • Introduced a new WebDavServer class 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)
  • Added Ktor server dependencies to the project to support the WebDAV server. (app/build.gradle.kts)

Settings and User Preferences:

  • Added a new user preference (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:

  • The AirSyncService now 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.

@sameerasw sameerasw self-assigned this May 21, 2026
@sameerasw sameerasw added the enhancement New feature or request label May 21, 2026
@sameerasw sameerasw merged commit db03d64 into develop May 21, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in AirSync Features and Bugs May 21, 2026
Mudit200408 pushed a commit to Mudit200408/airsync-android that referenced this pull request May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant