Skip to content

Fix Quick Share receiving and duplicate discovery - #157

Open
hkay-dev wants to merge 7 commits into
sameerasw:developfrom
hkay-dev:codex/android-quick-share-receive
Open

hkay-dev wants to merge 7 commits into
sameerasw:developfrom
hkay-dev:codex/android-quick-share-receive

Conversation

@hkay-dev

@hkay-dev hkay-dev commented Sep 24, 2026 •

Copy link
Copy Markdown

AI-assisted: Codex helped write and review this code and PR.

Why

The receiver sent ACCEPT before opening its Downloads output stream. The Mac could begin sending before Android was ready, leaving a pending file even when the sender reported success. During testing, duplicate discovery requests also registered a second mDNS service and coincided with the Mac staying on Connecting.

What changed

  • Open the Downloads output stream before sending ACCEPT. Require that stream for payload data, check the final byte count, and clear MediaStore's pending flag only for a complete file.
  • Start the handshake after the service installs connection callbacks. Failed connections now close and notify the service once, and the active-connection map supports calls from different threads.
  • Ignore a duplicate discovery request while discovery is active.

Checks

  • :app:assembleDebug passes.
  • Two consecutive Mac-to-Android sends completed using a side-by-side Android test build. A later send from the final Mac branch also appeared in /sdcard/Download/, matched the Mac copy by SHA-256, and had is_pending=0 in MediaStore.
  • No manifest, settings, build file, dependency, or wire-format changes.

Notes

This changes inbound Quick Share and duplicate discovery only. Other Android file-saving paths are unchanged.

Companion Mac PR: sameerasw/airsync-mac#301

sameerasw and others added 7 commits August 14, 2026 01:09
Develop - bug fixes and efficiency improvements
chore: bump app version to 4.0.1 (build 31)
Develop - Fix and improve networking, improve edge-to-edge and more
Develop - List expand toggle, main screen cleanup, liquid ripple, persist developer mode, improved foreground service checks, pause
Develop - QuickShare file sharng, dynamic device shortcut in share sheet, Updated permission usage info, Combined share sheet entry, Improved manual disconnect
@hkay-dev
hkay-dev marked this pull request as ready for review September 24, 2026 15:55
@sameerasw
sameerasw changed the base branch from main to develop October 27, 2026 13:45
@sameerasw sameerasw added the enhancement New feature or request label Oct 27, 2026
@sameerasw sameerasw added bug Something isn't working and removed enhancement New feature or request labels Oct 27, 2026
@sameerasw

Copy link
Copy Markdown
Owner

Can you check again if this exists? I might have fixed with the mac side PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants