-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Feature/#443] Notification 딥링크/웹링크 설정 #468
Conversation
a8f84f1
to
34dd6db
Compare
34dd6db
to
c0923af
Compare
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/src/main/AndroidManifest.xml
Outdated
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.
@yxnsx 이거 전부 singleTask건 이유가 있을까요?
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.
마이페이지를 예로 들면,
마이페이지에 있는 상태에서 마이페이지로 딥링크가 설정된 노티를 클릭할 시
마이페이지가 2중으로 뜨는 문제가 있습니다..!
그래서 딥링크를 통해 라우팅되는 페이지에는 singleTask를 걸어놨어요
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.
저도 이 부분이 궁금했는데요, 딥링크 시 이동되는 화면 위에 다른 activity가 열리는 경우는 없을까요?? (마이페이지의 경우 마이페이지에서 다른 activity로 이동) 그런 경우가 있다면 singleTop이 더 안전할 것 같아서요.
data class StartArgs( | ||
val isNeedToOpenAttendanceCodeDialog: Boolean = false, | ||
) : Serializable |
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.
이런 형식으로 Argument로 넘겨야 하는 이유가 있을까요?
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.
원래는 출석체크 페이지로 이동하는 딥링크
/ 출석체크 페이지에서 다이얼로그까지 여는 딥링크
이렇게 두 가지의 딥링크가 있었는데 다이얼로그까지 여는 딥링크의 경우 사용 빈도가 낮을 것 같다고 해서
출석체크 페이지로 이동하는 딥링크로 통합되었습니다!
이부분은 이제 불필요한 부분이긴 하네요 원복해서 푸시해뒀습니다
val linkIntent = when ( | ||
link.contains("http://") | ||
|| link.contains("https://") | ||
) { | ||
true -> checkWebLinkExpiration(link) | ||
false -> checkDeepLinkExistence(link) | ||
|
||
} |
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.
이정도면 그냥 if문으로 처리해줘도 될듯?
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.
오키 ~~! 수정해서 푸시해뒀습니다
주소의 expire date는 DeepLinkType enum class의 invoke 함수와 schemeActivity에서 두번 체크하게 되는걸까요 ~? |
@kimdahyee 중복된 부분 삭제해서 푸시해뒀습니다~! |
푸시 알림 Notification의 딥링크 및 웹링크 처리 로직을 구현하였습니다.
지금은 간단하게 설명만 적었지만 .. 나중에 시퀀스다이어그램이라도 추가해놓겠습니다..
주요 클래스
DeepLinkType.kt
DeepLinkType 내에 정의된 딥링크들은 위와 같은 형태이고요 ..
DeepLinkType의 companion object로 위와 같은 함수들을 선언해두었습니다.
딥링크를 통해 이동하는 페이지는 현재 모두 솝트 회원을 대상으로 하고 있기 때문에
인텐트 매핑 과정에서 UserStatus가 UNAUTHENTICATED인 경우 AuthActivity로 넘기도록 처리하였습니다.
SchemeActivity
수신한 링크가
등에 대한 유효성을 체크합니다.
유효성 체크가 끝나면
http://
또는https://
포함 여부로 링크를 딥링크/웹링크로 구분하고해당 타입에 따른 intent를 실행합니다.