Skip to content

K2GO-376 feat(contentexchange): wireless Share sender + invite QR - #695

Merged
luisguzman-adfa merged 3 commits into
mainfrom
feat/K2GO-376-share-sender
Oct 25, 2026
Merged

luisguzman-adfa merged 3 commits into
mainfrom
feat/K2GO-376-share-sender

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

What

Add the sender half of granular wireless Share (K2GO-376): over the content
manager selection, open a scoped share session on the local cx-core /v1/share
gate and show a two-section invite QR (join the hotspot, then scan to receive).
A foreground service holds the hotspot and the gate open with CPU and Wi-Fi
locks, and closes both on teardown. The device copies no bytes: cx-core streams
to the receiver that pulls over the hotspot.

Why

Share is the network twin of the merged disk Export: same bundle, manifest and
import, only the carrier changes. This slice is the sender plus the frozen QR
invite contract that the receiver fork reuses.

Scope

  • New: ContentShareService (specialUse FGS), ContentShareFragment, ShareSession,
    ShareHandshake, ShareInviteValidator, ShareTransport. CxCoreDataSource gains
    POST /v1/share create and the X-Share-Token header path.
  • Reuses the merged cx-core /v1/share gate, the hotspot stack (LocalHotspotManager
    / HotspotPermissions), QrSection, and the Export/Delete foreground-service and
    progress-fragment patterns.
  • No new Android permission or dependency.
  • The off-loopback exposure (:8095) and the receiver carrier are separate slices;
    a K2Go device cannot consume the invite until the receiver fork lands.

UI changes

New user-facing strings (English; machine-translated to 33 locales, flagged for
human review). All new, no before/after:

  • Share content | Sharing %1$d items | Preparing to share... | Starting the
    hotspot... | Finding the hotspot address...
  • Join | Receive | Scan on the other phone to join this hotspot. | Then scan this
    to receive the content.
  • This phone cannot start a hotspot to share. | Could not start the hotspot. |
    The hotspot permission is needed to share. | Could not start sharing. | Keep
    this screen open until the other phone finishes.
  • Done | Stop | Sharing content | The hotspot and the share stay open. | Content
    sharing
    Light and dark: PENDING on-device verification (see below).
    Note: pt rendered as European Portuguese; swap to pt-BR if targeted.

Verification

assembleStandardDebug + lintStandardDebug green, 0 MissingTranslation. +13 JVM
unit tests (ShareInviteValidator, ShareHandshake). Two-pass code review: 5
findings, 3 fixed, 2 deferred as follow-ups.

Open a scoped share session on the local cx-core over the selection, show the
invite QR, and hold the hotspot and gate open via a foreground service that
closes the gate and stops a self-started hotspot on teardown. Adds the cx-core
share calls (create/complete/delete, X-Share-Token) and the shared QR schema +
validator. The receiver pulls; the sender copies no bytes.
Use SnackbarDuration.millisForText instead of fixed LENGTH_LONG; null the
held selection when the hotspot permission is declined; call startForeground
in the duplicate-start branch so a startForegroundService start is honored.
Move the 19 k2go_cx_share_* strings from strings_untranslated.xml into
strings.xml and translate them across all 33 locales. Tracker now empty.
Machine translations, flagged for human review.
@luisguzman-adfa luisguzman-adfa added ui change or edit to UI strings changes or updates on xml strings files labels Oct 25, 2026
@luisguzman-adfa
luisguzman-adfa merged commit ee0f16c into main Oct 25, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/K2GO-376-share-sender branch October 25, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

strings changes or updates on xml strings files ui change or edit to UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant