-
Notifications
You must be signed in to change notification settings - Fork 0
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
푸시 알림 딥링크 #170
Conversation
|
||
companion object { | ||
const val URL_SCHEME = "url_scheme" | ||
val SCHEME = if (BuildConfig.DEBUG) "snutt-dev://" else "snutt://" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고민 1: 이 값은 strings.xml에 secret으로 넣는 게 맞을지?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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이 아닌가 해서 고민해봤음
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음...저는동의해요 비슷한 종류의 string인거 같기도 하고 조심해서 나쁠거 없고?ㅋㅋㅋ 좋은듯
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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" }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: route가 고도화될 경우 대응 필요
d1f6378
to
1089e15
Compare
No description provided.