Skip to content

공유 딥링크 Firebase Dynamic Links → App Links 전환 - #407

Open
unam98 wants to merge 1 commit into
developfrom
fix/android-app-links-migration
Open

공유 딥링크 Firebase Dynamic Links → App Links 전환#407
unam98 wants to merge 1 commit into
developfrom
fix/android-app-links-migration

Conversation

@unam98

@unam98unam98 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

작업 배경

  • Firebase Dynamic Links 서비스가 2025-08-25 완전 종료되어 기존 공유 기능(코스 상세 공유)이 동작하지 않는 상태였음
  • iOS가 이미 쓰고 있는 자체 호스팅 Universal Link(App Links) 방식으로 안드로이드를 맞춰 공유 기능을 복구

변경 사항

영역내용
SchemeActivity.ktFirebaseDynamicLinks SDK 제거, intent.data에서 직접 쿼리 파싱하는 방식으로 전환
CourseDetailActivity.kt, MyDrawDetailActivity.kt공유 로직을 SDK 비동기 호출 없이 고정 URL(runnect-ios.web.app/share) 조립 방식으로 단순화
AndroidManifest.xmlintent-filter 호스트를 rnnt.page.linkrunnect-ios.web.app/share로 변경, autoVerify="true" 추가
RunnectDynamicLink.ktRunnectShareLink.kt오브젝트 이름 변경 및 상수 정리
libs.versions.tomlfirebase-dynamic-links-ktx 의존성 제거

영향 범위

  • 코스 상세/보관함 공유 버튼 클릭 시 생성되는 URL 형식이 변경됨 (rnnt.page.linkrunnect-ios.web.app/share)
  • 공유 링크로 앱을 여는 딥링크 처리 흐름(SchemeActivity) 전체 변경
  • App Links 인증에 필요한 assetlinks.json은 iOS 레포(Firebase Hosting)에서 별도 배포 완료 (Runnect/Runnect-iOS#311)
  • 런타임 영향: 공유 URL 생성이 비동기 SDK 콜백 → 동기 문자열 조립으로 바뀌어 실패 케이스(addOnFailureListener)가 사라짐

Test Plan

  • ./gradlew :app:compileDebugKotlin 빌드 성공
  • 실기기에서 공유 → 링크 클릭 → 앱 진입(App Links) 실측 (미완료)
  • 앱 미설치 상태에서 공유 링크 클릭 시 Play스토어 폴백 확인 (미완료)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for Android App Links using the runnect-ios.web.app/share URL.
    • Sharing courses and drawings now uses direct shareable links.
    • Shared links open the relevant content in the app.
  • Bug Fixes

    • Improved handling of invalid or incomplete links.
    • Updated deep-link navigation and back behavior for app-opened content.

- Firebase Dynamic Links 서비스 종료(2025-08-25)로 깨진 공유 기능을 iOS와 동일한 Universal Link 방식(App Links)으로 교체
- SchemeActivity에서 FirebaseDynamicLinks SDK 대신 intent.data로 직접 쿼리 파싱
- CourseDetailActivity/MyDrawDetailActivity 공유 로직을 SDK 호출 없이 고정 URL(runnect-ios.web.app/share) 조립 방식으로 단순화
- AndroidManifest intent-filter를 rnnt.page.link에서 runnect-ios.web.app/share로 변경, autoVerify 추가
- RunnectDynamicLink → RunnectShareLink로 이름 변경, firebase-dynamic-links-ktx 의존성 제거
@unam98unam98 self-assigned this Aug 11, 2026
@coderabbitai

coderabbitaiBot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The app replaces Firebase Dynamic Links with verified Android App Links. It uses https://runnect-ios.web.app/share for course and drawing links, parses incoming course IDs directly, and shares URLs through standard Android chooser intents.

Changes

App Link sharing migration

Layer / File(s)Summary
Share link contract
app/src/main/AndroidManifest.xml, app/src/main/java/com/runnect/runnect/util/link/RunnectShareLink.kt
The manifest enables App Link verification for the /share path. RunnectShareLink uses the new HTTPS base URL.
App Link routing
app/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.kt, app/src/main/java/com/runnect/runnect/presentation/detail/CourseDetailActivity.kt, app/src/main/java/com/runnect/runnect/presentation/storage/mydrawdetail/MyDrawDetailActivity.kt
SchemeActivity parses URI data, validates course IDs, logs target analytics, and routes valid links with fromAppLink. Detail screens use the new App Link state.
Direct URL sharing
app/src/main/java/com/runnect/runnect/presentation/detail/CourseDetailActivity.kt, app/src/main/java/com/runnect/runnect/presentation/storage/mydrawdetail/MyDrawDetailActivity.kt, gradle/libs.versions.toml
Detail screens construct direct share URLs and launch Android chooser intents. The Firebase Dynamic Links library declaration is removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
participant Android
participant SchemeActivity
participant DetailActivity
participant ShareChooser
Android->>SchemeActivity: Deliver verified /share intent
SchemeActivity->>SchemeActivity: Parse course ID and target
SchemeActivity->>DetailActivity: Open course with fromAppLink
DetailActivity->>ShareChooser: Share RunnectShareLink URL
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly summarizes the main change from Firebase Dynamic Links to Android App Links for shared deep links.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/android-app-links-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/src/main/AndroidManifest.xml`:
- Around line 95-97: Update the AndroidManifest deep-link data entry to use
exact path matching for /share by replacing the android:pathPrefix attribute
with android:path. Keep the existing host runnect-ios.web.app unchanged.
- Around line 89-97: Update the VIEW intent-filter in AndroidManifest.xml to use
an exact android:path="/share" instead of android:pathPrefix, matching
RunnectShareLink.BASE_URL and excluding other /share... paths. Verify release
deep-link routing on a physical device, including web or Play Store fallback
when the app is not installed.
In `@app/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.kt`:
- Around line 27-30: Update the logged-out branch in SchemeActivity so
navigateToLoginScreen carries the incoming App Link URI or parsed target into
LoginActivity. Ensure LoginActivity preserves that value and routes to the
target after authentication succeeds, applying the same handling for both public
and private course links when login is required.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 55255841-de21-4cbe-b448-761e5d36a7af

📥 Commits

Reviewing files that changed from the base of the PR and between d7cb241 and 40f306e.

📒 Files selected for processing (6)
  • app/src/main/AndroidManifest.xml
  • app/src/main/java/com/runnect/runnect/presentation/detail/CourseDetailActivity.kt
  • app/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.kt
  • app/src/main/java/com/runnect/runnect/presentation/storage/mydrawdetail/MyDrawDetailActivity.kt
  • app/src/main/java/com/runnect/runnect/util/link/RunnectShareLink.kt
  • gradle/libs.versions.toml
💤 Files with no reviewable changes (1)
  • gradle/libs.versions.toml

Comment threadapp/src/main/AndroidManifest.xml
Comment threadapp/src/main/AndroidManifest.xml
Comment on lines 27 to 30
if (isUserLoggedIn()) {
handleDynamicLinks()
handleAppLink()
} else {
navigateToLoginScreen()

@coderabbitaicoderabbitaiBotAug 11, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Preserve the App Link through the login flow.

When the user is logged out, this branch starts LoginActivity without the incoming URI or parsed target. After authentication, the user cannot continue to the shared course.

Pass the App Link to the login flow and route it after login succeeds. Apply the same behavior to public and private course links if login remains required for both.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@app/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.kt`
around lines 27 - 30, Update the logged-out branch in SchemeActivity so
navigateToLoginScreen carries the incoming App Link URI or parsed target into
LoginActivity. Ensure LoginActivity preserves that value and routes to the
target after authentication succeeds, applying the same handling for both public
and private course links when login is required.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 코드 유지 (범위 밖으로 보류)

지적 자체는 타당하지만, 이 PR이 만든 회귀가 아니라 마이그레이션 이전부터 있던 동작입니다. origin/develop의 마이그레이션 전 SchemeActivity.kt도 동일하게 로그아웃 상태면 링크 정보 없이 LoginActivity로 보냅니다:

git show origin/develop:app/src/main/java/com/runnect/runnect/presentation/scheme/SchemeActivity.kt
...
if (isUserLoggedIn()) {
handleDynamicLinks()
} else {
navigateToLoginScreen() // 링크 정보 전달 없음, 이전부터 동일
}

이번 PR 범위는 Firebase Dynamic Links → App Links 전환이고 navigateToLoginScreen() 자체는 손대지 않았습니다. 로그인 플로우를 거쳐도 딥링크를 보존하는 건 legit한 UX 개선이지만 별도 작업으로 트래킹하는 게 맞다고 판단해 이 PR에서는 다루지 않았습니다.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@unam98, 확인했습니다. 이 동작은 이번 App Links 전환에서 새로 발생한 회귀가 아닙니다.

현재 PR의 범위를 고려하면 이 코멘트는 블로킹하지 않겠습니다. 로그인 후 App Link를 복원하는 개선은 별도 작업으로 추적하는 것이 적절합니다.

원하시면 PR과 이 코멘트를 연결한 후속 GitHub Issue를 생성하겠습니다.

You are interacting with an AI system.

Sign up for freeto 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.

1 participant

@unam98