-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: 문의하기 기능 구현 #427
The head ref may contain hidden characters: "feat/#423_\uBB38\uC758\uD558\uAE30_\uAE30\uB2A5_\uAD6C\uD604"
feat: 문의하기 기능 구현 #427
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,9 @@ class SettingActivity : AppCompatActivity() { | |
binding.tvSettingUnlink.setOnClickListener { | ||
showWithdrawalDialog() | ||
} | ||
binding.tvSettingInquiry.setOnClickListener { | ||
sendEmail() | ||
} | ||
} | ||
|
||
private fun navigateLogin() { | ||
|
@@ -91,9 +94,22 @@ class SettingActivity : AppCompatActivity() { | |
).show(supportFragmentManager, LOGOUT) | ||
} | ||
|
||
private fun sendEmail() { | ||
val intent = Intent(Intent.ACTION_SEND) | ||
intent.apply { | ||
type = INTENT_TYPE | ||
val emails = arrayOf(getString(R.string.setting_question_email)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이메일은 로컬라이징 사항일까요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 음 저도 이거에 대해서 많이 고민을 하다가 스트링에 넣어줬는데요! 빅스 말처럼 로컬라이징 기준을 고려하지 못했던 것 같아요! |
||
putExtra(Intent.EXTRA_EMAIL, emails) | ||
putExtra(Intent.EXTRA_SUBJECT, TITLE) | ||
startActivity(this) | ||
} | ||
} | ||
|
||
companion object { | ||
private const val LOGOUT = "LOGOUT" | ||
private const val WITHDRAWAL = "WITHDRAWAL" | ||
private const val INTENT_TYPE = "plain/text" | ||
private const val TITLE = "[나아가에게 문의하기]" | ||
|
||
private const val WRONG_AUTH_ERROR_CODE = 101 | ||
private const val EXPIRATION_AUTH_ERROR_CODE = 102 | ||
|
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.
[P2]
이메일을 성공적으로 보낸 후에 토스트 메시지로 전송되었다고 유저에게 알려주면 더 좋을 것 같아요!
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.
현재 이메일을 보내는 로직은, intent를 통해 메일 앱으로 연결을 해주어 해당 메일 앱에서 메일을 쓰고 전송하는 방식입니다!
메일 앱으로 이동 시켜 준 후의 상황들은 해당 메일 앱의 관할이기 때문에 저희 앱에선 메일이 잘갔는지 못갔는지 성공 여부를 확인할 방도가 없습니다🥹
따라서 메일을 성공적으로 보냈는 지 확인 후 토스트를 띄우게 하기 위해선 우리 앱이 메일 보내기에 대해 관리를 해주고 있어야하기 때문에..
그때부턴 우리 앱 안에 자체 메일 보내기 뷰를 만들고 SMTP를 사용해 메일을 보내야합니다! 이 로직일 경우에만 성공여부를 확인하고 토스트를 띄워줄 수 있게 되네요..
저도 토스트를 띄워주면 더 좋을 것 같다는 생각은 하지만...
큰 로직 변경 및 뷰 추가가 생겨날 것 같아 이에 대해 크롱의 의견이 궁금합니다!😄