Skip to content

feat: [QRSCANNER] Connect by scanning the desktop QR code - #748

Merged
florent37 merged 7 commits into
mainfrom
feat/qr-code-scanner
Oct 31, 2026
Merged

florent37 merged 7 commits into
mainfrom
feat/qr-code-scanner

Conversation

@florent37

@florent37 florent37 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Description

Android counterpart of the QR code scan added to FloconSwift: connect to Flocon Desktop by scanning its QR code instead of typing the IP.

SDK (new optional module flocon-qr-scanner, with its -no-op)

  • Flocon.scanQrCodeAndConnect(context) opens the Google code scanner (a Google Play Services screen: no camera permission, but Play Services is required), then connects. It returns the FloconConnectResult, or null if the user closes the scanner. A scan failure (for example without Play Services) is a Failed.
  • Flocon.connectWithQrCode(content) connects from the text of a QR code, for an app with its own camera screen. The content is the IP address the desktop puts in its QR, or a URL whose host is that address (scheme, port and path are ignored).
  • The no-op module has the same API and does nothing.
  • It lives in a separate module because it needs the Google Play Services dependency, which :flocon must not pull.

Sample: the Android app sets SampleQrScanner.scan, and the connection screen shows a "Scan the QR code of Flocon Desktop" button when it is set. Release builds use the no-op.

Docs: docs/setup.md, "Connecting with a QR code" (replaces "not available yet").

Tests: QrCodeAddressTest (jvmTest) for the QR content parsing.

/gemini review


Generated by Claude Code

Comment thread docs/setup.md Resolved
@florent37
florent37 marked this pull request as ready for review October 31, 2026 11:52
@florent37
florent37 enabled auto-merge (squash) October 31, 2026 11:52
@florent37
florent37 disabled auto-merge October 31, 2026 12:58
@florent37
florent37 merged commit 37ce6b1 into main Oct 31, 2026
2 checks passed
@florent37
florent37 deleted the feat/qr-code-scanner branch October 31, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants