Skip to content

Conversation

@LEE-GEON-HYEONG
Copy link

No description provided.

Copy link
Contributor

@kongwoojin kongwoojin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다.
코멘트 확인해주세요

btnPlayPause = findViewById(R.id.button_play_pause)

btnRequestPermission.setOnClickListener {
if (permissionDeniedCount < 2) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

애플리케이션 재실행 시 permissionDeniedCount가 초기화되기 때문에, 다이얼로그를 띄울 수 없어도 permissionDeniedCount가 0이라 띄우려고 시도를 하게 됩니다.


override fun getItemCount(): Int = musicList.size

private fun formatDuration(durationMs: Long): String {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long의 확장함수로 작성할 수 있을 것 같습니다

private fun playMusic(uri: Uri) {
mediaPlayer?.release()
try {
val fd = contentResolver.openFileDescriptor(uri, "r")?.fileDescriptor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null check를 한 이유가 있을까요?

private fun createNotificationChannel() {
val channel = NotificationChannel(
CHANNEL_ID,
"음악 재생 채널",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

알림 채널 ID와 이름은 보통 상수로 분리합니다

"음악 재생 채널",
NotificationManager.IMPORTANCE_LOW
).apply {
description = "음악 재생 상태를 보여주는 채널"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string resource 써주세요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants