Open
Conversation
kongwoojin
reviewed
Jul 1, 2025
| btnPlayPause = findViewById(R.id.button_play_pause) | ||
|
|
||
| btnRequestPermission.setOnClickListener { | ||
| if (permissionDeniedCount < 2) { |
Contributor
There was a problem hiding this comment.
애플리케이션 재실행 시 permissionDeniedCount가 초기화되기 때문에, 다이얼로그를 띄울 수 없어도 permissionDeniedCount가 0이라 띄우려고 시도를 하게 됩니다.
|
|
||
| override fun getItemCount(): Int = musicList.size | ||
|
|
||
| private fun formatDuration(durationMs: Long): String { |
Contributor
There was a problem hiding this comment.
Long의 확장함수로 작성할 수 있을 것 같습니다
| private fun playMusic(uri: Uri) { | ||
| mediaPlayer?.release() | ||
| try { | ||
| val fd = contentResolver.openFileDescriptor(uri, "r")?.fileDescriptor |
| private fun createNotificationChannel() { | ||
| val channel = NotificationChannel( | ||
| CHANNEL_ID, | ||
| "음악 재생 채널", |
Contributor
There was a problem hiding this comment.
알림 채널 ID와 이름은 보통 상수로 분리합니다
| "음악 재생 채널", | ||
| NotificationManager.IMPORTANCE_LOW | ||
| ).apply { | ||
| description = "음악 재생 상태를 보여주는 채널" |
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.
No description provided.