Skip to content

Conversation

@kangyuri1114
Copy link
Member

Summary

기존 웹뷰 이동 방식에서
카카오 SDK를 통해
카카오톡 채널로 이동하는 공식 플로우를 사용하는 방식으로 수정

Describe your changes

  • WebView → SDK 기반 외부 연동
  • 클릭 시 웹 카카오톡 채널이 아닌 카카오톡 앱 내 채널화면이 열림

Issue

To reviewers

제훈님이 올려주신 코드에서 추가작업이 필요한줄 알았는데, 지금 확인해보니 카카오앱 내 채널 화면으로 이동되도록 코드 잘 작성해주신 것 같아 바로 PR 올립니다.
다만 제훈님과 저는 안드로이드 기기로 카카오톡 앱 로그인이 불가능하여서 갤럭시 유저(진님)이 해당 브랜치에서 테스트를 해주셔야 할 것 같습니다 ㅜㅜ @HI-JIN2
만약 정상작동 테스트되면 머지하면 좋을 것 같습니다

val channelPublicId = "_ZlVAn"

여기서 채널 id는 우리 채널 웹 링크의 마지막 부분과 같아 해당 링크 정상 접속되고 있습니다 http://pf.kakao.com/_ZlVAn

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kangyuri1114, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 '문의하기' 기능을 카카오 SDK를 사용하여 재구현함으로써 사용자 경험을 향상시키는 것을 목표로 합니다. 기존의 웹뷰 기반 접근 방식 대신, 사용자가 카카오톡 채널에 직접 연결될 수 있도록 하여 더욱 통합적이고 편리한 문의 흐름을 제공합니다.

Highlights

  • 카카오 SDK 통합: 문의하기 기능을 웹뷰 방식에서 카카오 SDK를 활용하는 방식으로 변경하여, 카카오톡 채널로의 연결을 더욱 원활하게 개선했습니다.
  • 카카오톡 앱 내 채널 직접 연결: 이제 '문의하기' 버튼을 클릭하면 웹 기반 채널이 아닌 카카오톡 앱 내에서 채널 화면이 직접 열리도록 수정되었습니다.
  • 의존성 업데이트 및 추가: 카카오 SDK 관련 의존성(kakao-login 및 kakao-talk)이 app/build.gradle.kts 및 gradle/libs.versions.toml 파일에서 업데이트 및 추가되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

안녕하세요. 문의하기 기능을 기존 웹뷰 방식에서 카카오 SDK를 사용하도록 개선하는 PR 잘 보았습니다. 사용자 경험을 향상시키는 좋은 변경이라고 생각합니다.

코드 리뷰 결과, 몇 가지 개선점을 발견했습니다.

  1. MyPageFragment.kt에서 카카오톡 채널 ID가 하드코딩되어 있어 상수로 추출하는 것을 제안했습니다.
  2. chatChannel 함수의 콜백 로직이 잘못 구현되어, 카카오톡 앱 실행 성공 여부와 관계없이 항상 웹 브라우저가 열리는 버그가 발생할 수 있습니다. 이 부분을 수정하는 제안을 남겼습니다.

자세한 내용은 각 파일의 인라인 코멘트를 참고해주세요. 감사합니다.

Comment on lines +147 to +150
TalkApiClient.instance.chatChannel(context, channelPublicId) {
val url = TalkApiClient.instance.chatChannelUrl(channelPublicId)
KakaoCustomTabsClient.openWithDefault(context, url)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

high

TalkApiClient.instance.chatChannel의 콜백 사용법이 올바르지 않습니다. 이 콜백은 카카오톡 앱 실행 시도 후 항상 호출되며, 실패 시 error 객체를 전달받습니다. 현재 코드는 실패 여부와 관계없이 항상 웹 브라우저를 열게 되어, 카카오톡 앱이 정상적으로 열린 후에도 불필요하게 웹페이지가 열리는 문제가 발생할 수 있습니다. errornull이 아닐 때만 fallback 로직(웹 브라우저로 열기)이 실행되도록 수정해야 합니다. 또한, 에러 로깅을 추가하여 디버깅을 용이하게 하는 것이 좋습니다.

            TalkApiClient.instance.chatChannel(context, channelPublicId) { error ->
                if (error != null) {
                    Timber.d(error, "카카오톡 채널 채팅 열기 실패")
                    val url = TalkApiClient.instance.chatChannelUrl(channelPublicId)
                    KakaoCustomTabsClient.openWithDefault(context, url)
                }
            }

ScreenId.EXTERNAL_INQUIRE
)
val context = requireContext()
val channelPublicId = "_ZlVAn"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

채널 ID가 하드코딩되어 있습니다. 코드의 가독성과 유지보수성을 높이기 위해 companion object에 상수로 정의하는 것을 권장합니다. 예를 들어, MyPageFragment 클래스 내에 companion object { private const val KAKAO_TALK_CHANNEL_PUBLIC_ID = "_ZlVAn" }를 추가하고, 이 상수를 사용해주세요.

Suggested change
val channelPublicId = "_ZlVAn"
val channelPublicId = KAKAO_TALK_CHANNEL_PUBLIC_ID

Copy link
Member

@PeraSite PeraSite left a comment

Choose a reason for hiding this comment

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

진님께서 실제 폰에서 카카오톡 켜서 테스트만 해주시면 바로 머지해도 될 것 같습니당

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.

카카오톡 채널 연결이 안되는 문제

3 participants