[FEAT/#1649] 알림 권한 요청 로직 추가 - #1650
Open
seungjunGong wants to merge 7 commits into
Open
Conversation
- 내부경로로만 존재하는 SchemeActivity 의 exported 속성을 false 로 변경
- `UserStorage` 인터페이스에 `isNotificationPermissionRequested` 필드 및 `saveNotificationPermissionRequested` 메서드 추가 - `DefaultSoptStorage`에 관련 DataStore 로직 구현 - `clearAll` 호출 시에도 알림 권한 요청 상태는 유지되도록 수정
- 알림 채널 생성 로직을 `SoptNotificationChannel`로 분리하고 `App.kt`에서 초기화하도록 변경 - `MainActivity`에서 Android 13 이상 및 인증된 사용자를 대상으로 알림 권한(`POST_NOTIFICATIONS`)을 1회 요청하는 로직 추가 - `UserStorage`를 사용하여 권한 요청 여부를 기록하고 중복 요청 방지 - `AuthActivity` 내 불필요한 알림 채널 생성 코드 제거
- `SoptNotificationChannel`을 통해 알림 채널 ID를 동적으로 가져오도록 수정하고, 기존 하드코딩된 `NOTIFICATION_CHANNEL_ID` 제거. - Android 13(Tiramisu) 이상 대응을 위한 `POST_NOTIFICATIONS` 권한 체크 로직 추가. - `NotificationManager` 대신 `NotificationManagerCompat`을 사용하도록 변경. - `PendingIntent` 플래그를 `FLAG_IMMUTABLE`로 통일하여 보안성 강화. - `strings.xml`의 `default_channel_id` 값을 기존 사용자의 채널 설정을 유지하기 위해 "알림"으로 변경.
- `link.contains()` 대신 `link.startsWith()`를 사용하여 HTTP/HTTPS URL 여부 판별 로직을 강화합니다. - URL 파싱 시 `Uri.parse(link)` 대신 `link.toUri()` 확장 함수를 사용하도록 변경합니다.
Update `targetSdk` to 36 in `libs.versions.toml`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue 🛠
Work Description ✏️
기존에 빠져있던 알림 권한 요청 로직을 추가했습니다. 변경사항은 아래와 같아요.
PendingIntent를FLAG_IMMUTABLE로 변경Screenshot 📸
Uncompleted Tasks 😅
To Reviewers 📢
앱 내 알림권한 요청을 받는 부분이 없어 시스템 권한 팝업을 노출하는 방식을 적용해놓았는데, 추후에 바텀시트 등의 안내 UI 와 함께 커스텀 권한 요청을 적용하는 것도 고려해 보면 좋을거 같습니다.
++ targetSdk 36 으로 올리고 전체적인 서비스 동작 여부 확인했습니다.