android-oss icon indicating copy to clipboard operation
android-oss copied to clipboard

MBL-2851: Re-enable support for Discover deep links

Open tonyteate opened this issue 2 months ago โ€ข 1 comments

โš ๏ธ To error on the side of caution, merge only for January Release, unless we are super comfortable. Do not include in any hotfixes.


๐Ÿ“ฒ What

Re-enable support for Discover deep links

๐Ÿค” Why

The initial introduction of a Splash Screen in #2443 removed support for Discover deep links, which were originally supported by DiscoveryActivity via Intent Filter, but only for the ksr:// scheme. Here we re-enable support for Discover deep links (and app links), through the splash screen, for both the ksr:// and https:// schemes.

๐Ÿ›  How

Update the Intent-processing logic in SplashScreenViewModel to filter for Discover URLs via regex and emit an Optional<Uri>. When present, a new instance of DiscoveryActivity is launched with action.VIEW and the Uri as Data; when empty, delegate to the existing logic for starting a new DiscoveryActivity (with action.MAIN).

DiscoveryViewModel already knows how to handle these Intents, including parsing and transforming Uris into DiscoveryParams. To help mitigate the existing possibility of race condition between handling DiscoveryParams and rendering the ViewPager with the correct tab selected, we update DiscoveryActivity to call provideIntent() only after a first-pass render of the view tree has completed.

๐Ÿ‘€ See

Before ๐Ÿ›

https://github.com/user-attachments/assets/95f45b4b-4839-43ae-8e9e-cd7a4f459800

After ๐Ÿฆ‹ |

https://github.com/user-attachments/assets/a7305e4e-2387-4d11-a659-09fe6f167f5d

๐Ÿ“‹ QA

Setup

  • Precondition: Fresh install of the app, unopened.
  • Launch the app from the Home Screen or App Drawer (or Android Studio)
  • Result:
    • The system navigates to Discover and immediately displays Onboarding
  • Step through Onboarding to enable Personalization and enable Push Notifications, then click 'Explore the app'
  • Terminate the app
  • Go to app Settings (long press the app icon and select 'App info')
  • Click 'Open by default'
  • Click 'Add link'
  • Select both *.kickstarter.com and www.kickstarter.com
  • Click 'Add'
  • Results:
    • 'In the app' should be selected
    • Under 'Links to open in this app', one label reads '0 verified links', but both options underneath are selected.

Discover Category via App Link

  • Open the app (will also work if the app is terminated)
  • Open Chrome
  • Search in Google: "https://www.kickstarter.com/discover/categories/journalism"
  • Click the first result for "Discover ยป Journalism" pointing to https://www.kickstarter.com โ€บ discover โ€บ categories โ€บ journalism
  • Results:
    • The system should navigate to a new Discover screen filtered to the "Journalism" Category

Discover Category via Banner Deep Link

  • Open the app (will also work if the app is terminated)
  • Open Chrome
  • Visit https://www.kickstarter.com
  • Click any Category in the top-left corner
  • Click the 'Open' button in the app banner (which uses the ksr:// scheme)
  • Results:
    • The system should navigate to a new Discover screen filtered to the selected Category

Discover Sort via ADB

  • Open the app (will also work if the app is terminated)

  • Run the following command to simulate opening an LCM deep link to a sorted Discover

    adb shell 'am start -a android.intent.action.VIEW -d "https://www.kickstarter.com/discover/advanced?sort=newest" com.kickstarter.kickstarter.internal.debug'
    
  • Results:

    • The system should navigate to a new Discover screen for All Projects sorted by Newest

Story ๐Ÿ“–

[MBL-2851] [Fast Follow] Support LCM deep links to Discover - Jira

tonyteate avatar Dec 08 '25 16:12 tonyteate

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 64.27%. Comparing base (5d3a87b) to head (b1b1def). :exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #2456   +/-   ##
=========================================
  Coverage     64.27%   64.27%           
- Complexity     2403     2405    +2     
=========================================
  Files           378      378           
  Lines         28744    28754   +10     
  Branches       4145     4147    +2     
=========================================
+ Hits          18474    18483    +9     
  Misses         8011     8011           
- Partials       2259     2260    +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Dec 08 '25 17:12 codecov-commenter