Skip to content

Commit

Permalink
Merge pull request #101 from Team-Umbba/fix/#100
Browse files Browse the repository at this point in the history
[Fix/#100] 오류 해결
  • Loading branch information
yeoncheong authored Jul 21, 2023
2 parents cb6a057 + 9165795 commit bbae617
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 22 deletions.
3 changes: 2 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@

# https://developers.kakao.com/docs/latest/en/getting-started/sdk-android#configure-for-shrinking-and-obfuscation-(optional)
-keep class com.kakao.sdk.**.model.* { <fields>; }
-keep class * extends com.google.gson.TypeAdapter
-keep class * extends com.google.gson.TypeAdapter
-keep class com.google.googlesignin.** { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ class InviteCodeDialogFragment(private val inviteUserName: String, private val i
content = Content(
title = getString(R.string.kakao_title, inviteUserName, inviteCode),
description = getString(R.string.kakao_description),
imageUrl = getString(R.string.kakao_image_url),
imageUrl = "https://github.com/Team–Umbba/Umbba–iOS/assets/75068759/64ba7265–9148–4f06–8235-de5f4030e92f",
link = Link(
webUrl = getString(R.string.kakao_link),
mobileWebUrl = getString(R.string.kakao_link)
webUrl = "https://developers.kakao.com",
mobileWebUrl = "https://developers.kakao.com"
)
),
buttons = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ class NotifyTimeActivity :
private fun goOnboardingFinishActivity() {
with(binding) {
btnGoPast.setOnSingleClickListener {
startActivity(Intent(this@NotifyTimeActivity, OnboardingFinishActivity::class.java))
startActivity(Intent(this@NotifyTimeActivity, OnboardingFinishActivity::class.java)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,40 @@ class SetTimeActivity : BindingActivity<ActivitySetTimeBinding>(R.layout.activit
}

private fun askNotificationPermission() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
if (ContextCompat.checkSelfPermission(
this,
Manifest.permission.POST_NOTIFICATIONS
) == PackageManager.PERMISSION_GRANTED
) {
Snackbar.make(binding.root, R.string.allowing_notification, Snackbar.LENGTH_SHORT).show()
} else if (shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS)) {
if (ContextCompat.checkSelfPermission(
this,
Manifest.permission.POST_NOTIFICATIONS
) == PackageManager.PERMISSION_GRANTED
) {
Snackbar.make(binding.root, getString(R.string.allowing_notification), Snackbar.LENGTH_SHORT).show()
}

if (ContextCompat.checkSelfPermission(
this,
Manifest.permission.POST_NOTIFICATIONS
) != PackageManager.PERMISSION_GRANTED){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU){
if (shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS)) {
// 왜 알림을 허용해야 하는지에 대한 설명 + 권한 거절 시 권한 설정 화면으로 이동
Snackbar.make(
binding.root,
getString(R.string.if_allow_notification),
Snackbar.LENGTH_SHORT
).show()
val intent =
Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).setData(Uri.parse("package:" + this.packageName))
startActivity(intent)
this.finish()
} else {
requestPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS)
}
}
else{
Snackbar.make(
binding.root,
R.string.if_allow_notification,
getString(R.string.setting_noti),
Snackbar.LENGTH_SHORT
).show()
val intent =
Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).setData(Uri.parse("package:" + this.packageName))
startActivity(intent)
this.finish()
} else {
requestPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS)
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<string name="night">밤</string>
<string name="everyday_notification">매일 %s %d시에\n교신을 보내줄게</string>
<string name="everyday_notification_half">매일 %s %d시 반에\n교신을 보내줄게</string>
<string name="setting_noti">설정에서 알림을 설정하세요.</string>

<!-- quest activity-->
<string name="quest_progressbar_comment">거의 다 왔어! 조금만 힘내줘!</string>
Expand Down Expand Up @@ -108,8 +109,6 @@
<string name="install_kakaotalk">카카오톡을 설치해주세요.</string>
<string name="kakao_title">%s으로부터 초대가 왔어요.\n초대코드 : %s</string>
<string name="kakao_description">과거로 떠나 함께 추억을 나누고,\n공감대를 형성해보세요.</string>
<string name="kakao_image_url">https://github.com/Team–Umbba/Umbba–iOS/assets/75068759/64ba7265–9148–4f06–8235-de5f4030e92f</string>
<string name="kakao_link">https://developers.kakao.com</string>
<string name="kakao_button">초대 받기</string>

<!--confirm answer dialog fragment-->
Expand Down

0 comments on commit bbae617

Please sign in to comment.