diff --git a/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt b/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt index a1e62370..722cde01 100644 --- a/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt +++ b/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt @@ -4,6 +4,7 @@ import android.content.Intent import android.net.Uri import android.os.Build import android.os.Bundle +import android.provider.Settings import android.view.View import androidx.fragment.app.viewModels import com.google.android.gms.oss.licenses.OssLicensesMenuActivity @@ -20,6 +21,7 @@ import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint class MyPageFragment : BindingFragment(R.layout.fragment_my_page) { private val myPageViewModel: MyPageViewModel by viewModels() + private val notificationPermissionRequestCode = 101 override fun onResume() { super.onResume() @@ -29,6 +31,7 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) binding.viewModel = myPageViewModel + initNotificationBtnClickListener() initBlockBtnClickListener() initWithdrawBtnClickListener() initLogoutBtnClickListener() @@ -39,6 +42,15 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ initOpenSourceClickListener() } + private fun initNotificationBtnClickListener() { + binding.tvMyPageNotification.setSingleOnClickListener { + val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply { + data = Uri.fromParts("package", requireContext().packageName, null) + } + requireContext().startActivity(intent) + } + } + private fun initBlockBtnClickListener() { binding.tvMyPageBlock.setSingleOnClickListener { startActivity(Intent(requireActivity(), BlockedUserActivity::class.java)) diff --git a/app/src/main/res/layout/fragment_my_page.xml b/app/src/main/res/layout/fragment_my_page.xml index f0ed7f0d..34c0879a 100644 --- a/app/src/main/res/layout/fragment_my_page.xml +++ b/app/src/main/res/layout/fragment_my_page.xml @@ -92,19 +92,41 @@ + + + + - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6a9c5c1a..61db748e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -81,6 +81,7 @@ 북과픽 안녕하세요. 저는 북과픽입니다. + 알림 설정 차단사용자 관리하기 문의하기 @@ -218,4 +219,4 @@ 앗! 피카북이 달라졌어요 업데이트 하러 가기 https://play.google.com/store/apps/details?id=com.sopt.peekabookaos&hl=ko-KR - \ No newline at end of file +