Skip to content

Resolve appstore deep links across sources#278

Open
sifounak wants to merge 1 commit into
coredevices:masterfrom
sifounak:fix/cross-store-appstore-deeplinks
Open

Resolve appstore deep links across sources#278
sifounak wants to merge 1 commit into
coredevices:masterfrom
sifounak:fix/cross-store-appstore-deeplinks

Conversation

@sifounak

@sifounak sifounak commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Fixes #277 .

This PR updates pebble://appstore/{id} deep-link handling so app store links can resolve listings across multiple app store sources, instead of assuming only the legacy Rebble feed. This fixes cases where a valid listing exists only in the newer RePebble/Pebble app store and the current app opens a blank app detail screen.

Background

The existing deep-link handler routed pebble://appstore/{id} to the Rebble app store source only. That works for older Rebble-hosted listings, but fails for newer listings that only exist in the RePebble/Pebble feed, such as Pebble AlarmSync.

Since app store IDs are source-scoped in the app model, a deep link should resolve the {id} against known app store sources before navigating to the listing detail screen.

Changes

  • Added app store deep-link resolution to PebbleWebServices.
  • Updated RealPebbleDeepLinkHandler so pebble://appstore/{id}:
    • Searches all configured app store sources, including disabled sources.
    • Prioritizes built-in sources deterministically: Pebble/RePebble first, Rebble second, then custom sources.
    • Navigates with both storedId and storeSource, preserving the existing source-scoped detail route.
    • Shows a snackbar instead of navigating to a blank detail screen if no source contains the app ID.
  • Added optional source hints for unambiguous future links:
    • pebble://appstore/{id}?source=pebble
    • pebble://appstore/{id}?source=repebble
    • pebble://appstore/{id}?source=rebble
    • Exact custom source URLs are also supported.
  • Added tests for source ordering and source-hint behavior.
  • Updated the preview/fake PebbleWebServices implementation for the new interface method.

Notes On ID Conflicts

This keeps treating app store IDs as source-scoped rather than globally unique. If the same ID appears in multiple stores and no source hint is provided, the resolver uses the deterministic priority order above. Source hints can be used where collision-proof links are needed.

Testing

  • Passed:
    $env:ANDROID_HOME="$env:LOCALAPPDATA\Android\Sdk"; $env:ANDROID_SDK_ROOT=$env:ANDROID_HOME; .\gradlew :pebble:testDebugUnitTest --no-daemon
  • Interactively tested on a local Android phone and deep link to Pebble AlarmSync opened successfully (it was a blank screen before)

@CLAassistant

CLAassistant commented Jul 1, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ericmigi ericmigi requested a review from sjp4 July 2, 2026 06:24
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.

Deep link "pebble://appstore/{id}" appears to be hardcoded to Rebble feed only

2 participants