Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

푸시 알림 딥링크 #170

Merged
merged 3 commits into from
Jun 16, 2023
Merged

푸시 알림 딥링크 #170

merged 3 commits into from
Jun 16, 2023

Conversation

JuTaK97
Copy link
Collaborator

@JuTaK97 JuTaK97 commented May 28, 2023

No description provided.

@JuTaK97 JuTaK97 requested a review from a team as a code owner May 28, 2023 07:51

companion object {
const val URL_SCHEME = "url_scheme"
val SCHEME = if (BuildConfig.DEBUG) "snutt-dev://" else "snutt://"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

고민 1: 이 값은 strings.xml에 secret으로 넣는 게 맞을지?

Copy link
Collaborator

Choose a reason for hiding this comment

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

잘 몰라서 검색해봤는데 스킴을 숨기는 이유가 외부에서 악의적으로 같은 스킴을 쓰는걸 막기 위해서야?
https://medium.com/prnd/%EB%94%A5%EB%A7%81%ED%81%AC%EC%9D%98-%EB%AA%A8%EB%93%A0%EA%B2%83-feat-app-link-universal-link-deferred-deeplink-61d6cf63a0a5

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

그런 이유도 있긴 한데 우리 앱 정도에서 신경쓸 건 아니긴 해
그것보다는 그냥 우리 app_name이나 base_url 같은 거랑 같은 종류의 string이 아닌가 해서 고민해봤음

Copy link
Collaborator

Choose a reason for hiding this comment

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

음...저는동의해요 비슷한 종류의 string인거 같기도 하고 조심해서 나쁠거 없고?ㅋㅋㅋ 좋은듯

Copy link
Collaborator Author

Choose a reason for hiding this comment

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


private fun handleDeepLink() {
intent.extras?.getString(URL_SCHEME)?.let {
intent.data = Uri.parse(it)
Copy link
Collaborator Author

@JuTaK97 JuTaK97 May 28, 2023

Choose a reason for hiding this comment

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

앞으로 딥링크 외에도 푸시알림에 들어있는 정보는 모두 여기서 처리하기

@@ -233,10 +238,12 @@ class RootActivity : AppCompatActivity() {

private fun NavGraphBuilder.composable2(
route: String,
deepLinks: List<NavDeepLink> = listOf(navDeepLink { uriPattern = "$SCHEME$route" }),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO: route가 고도화될 경우 대응 필요

@JuTaK97 JuTaK97 force-pushed the jutak/notification-deep-link branch from d1f6378 to 1089e15 Compare June 15, 2023 02:28
@JuTaK97 JuTaK97 enabled auto-merge (squash) June 15, 2023 02:28
@JuTaK97 JuTaK97 merged commit 27a399b into develop Jun 16, 2023
3 checks passed
@JuTaK97 JuTaK97 deleted the jutak/notification-deep-link branch June 16, 2023 09:28
@JuTaK97 JuTaK97 mentioned this pull request Jun 17, 2023
This pull request was closed.
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.

2 participants