Summary
Update the Formulus settings QR payload so it can be scanned by the system camera (Android first; investigate iOS) and open Formulus into the settings / profile flow, instead of only working when scanned from the in-app Settings scanner.
Today the QR encodes an opaque FRMLS:… string (FRMLSHelpers, Portal, synk qr, formulus/scripts/generateQR.ts). That is not a URI, so OS cameras do not offer an “Open in Formulus” action.
Proposed URI shape
Prefer a custom URL scheme (not an https://opendataensemble.org/… App/Universal Link):
formulus://settings?<FRMLS payload>
Rationale: best fit for app-only deep links. Catching a shared opendataensemble.org HTTPS path risks colliding with normal website / docs QR codes.
Exact query encoding can be finalized in implementation (e.g. wrap the existing FRMLS string in a query param). Keep the FRMLS body as the credential payload.
Requirements
Formulus (consume path)
- Register an Android intent filter for the
formulus:// scheme (path/host for settings as needed).
- On cold/warm start from such a URI: navigate into the settings/profile flow and treat the payload like an in-app QR scan.
- Confirmation before applying: show a confirmation dialog before saving. Likely lands after Formulus profiles work lands — in practice this becomes “Add new profile” + confirm before persist (same effective outcome as scanning in-app, with an explicit confirm step).
- Backward compatibility: in-app scanner must continue to accept bare
FRMLS:… codes (no URI wrapper).
- Deep-linked URIs that contain FRMLS must parse the same fields (
serverUrl / username / password) via existing QRSettingsService / decodeFRMLS path (or a thin wrapper around it).
iOS
- Spike whether the same
formulus://settings?… custom scheme is feasible (URL types in Info.plist + Linking), and whether OS Camera / Control Center scanner surfaces an open-app affordance comparable to Android.
- If iOS system-camera open is weak or unreliable, ship Android first and document iOS as follow-up or in-app-only for now.
Generators (same issue)
Update all producers to emit the new URI-wrapped form (while documenting that bare FRMLS remains readable in-app):
- Synkronus Portal (
synkronus-portal FRMLS / formulus QR helpers)
- Synkronus CLI (
synk qr)
- Formulus script
formulus/scripts/generateQR.ts
Acceptance criteria
Notes / context
- Current encode format:
FRMLS:v:<b64>;s:<b64>;u:<b64>;p:<b64>;;
- Related code:
formulus/src/utils/FRMLSHelpers.ts, formulus/src/services/QRSettingsService.ts, formulus/src/screens/SettingsScreen.tsx, Portal frmls / formulus QR utils, synkronus-cli qr command.
- Profiles dependency: confirmation / “Add new profile” behavior may intentionally follow the profiles work.
Summary
Update the Formulus settings QR payload so it can be scanned by the system camera (Android first; investigate iOS) and open Formulus into the settings / profile flow, instead of only working when scanned from the in-app Settings scanner.
Today the QR encodes an opaque
FRMLS:…string (FRMLSHelpers, Portal,synk qr,formulus/scripts/generateQR.ts). That is not a URI, so OS cameras do not offer an “Open in Formulus” action.Proposed URI shape
Prefer a custom URL scheme (not an
https://opendataensemble.org/…App/Universal Link):Rationale: best fit for app-only deep links. Catching a shared
opendataensemble.orgHTTPS path risks colliding with normal website / docs QR codes.Exact query encoding can be finalized in implementation (e.g. wrap the existing FRMLS string in a query param). Keep the FRMLS body as the credential payload.
Requirements
Formulus (consume path)
formulus://scheme (path/host for settings as needed).FRMLS:…codes (no URI wrapper).serverUrl/ username / password) via existingQRSettingsService/decodeFRMLSpath (or a thin wrapper around it).iOS
formulus://settings?…custom scheme is feasible (URL types in Info.plist +Linking), and whether OS Camera / Control Center scanner surfaces an open-app affordance comparable to Android.Generators (same issue)
Update all producers to emit the new URI-wrapped form (while documenting that bare FRMLS remains readable in-app):
synkronus-portalFRMLS / formulus QR helpers)synk qr)formulus/scripts/generateQR.tsAcceptance criteria
FRMLS:…and the newformulus://settings?…form.synk qr, andgenerateQR.tsemit the new URI format.opendataensemble.orgHTTPS links for this feature.Notes / context
FRMLS:v:<b64>;s:<b64>;u:<b64>;p:<b64>;;formulus/src/utils/FRMLSHelpers.ts,formulus/src/services/QRSettingsService.ts,formulus/src/screens/SettingsScreen.tsx, Portalfrmls/ formulus QR utils,synkronus-cliqrcommand.