Skip to content

Conversation

@jusang3057
Copy link
Owner

2025 01 06

매니패스트에 FOREGROUND_SERVICE라는 권한을 추가해야 한다고 하여 권한 확인하는 부분에 해당 권한을 허용하도록 함.
그런데 권한 허용 창이 뜨지 않길래 찾아보니 매니패스트에만 명시하면 되는 작업이라 함.
그래서 FOREGROUND_SERVICE권한 허용 코드가 있지만, 사용하지는 않음(다시 코드 수정하기 귀찮아서;; 어짜피 오류도 안나고)

2025 01 06
Copy link

@skdud0629 skdud0629 left a comment

Choose a reason for hiding this comment

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

수고하셨어요!

}

fun getMusicFilesData() {
val contentResolver: ContentResolver = requireContext().contentResolver

Choose a reason for hiding this comment

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

리사이클러뷰는 snake_case로 선언하시고 여기서는 camelCase를 사용하셨는데, 이렇게 통일하지 않고 사용하시면 코드의 가독성이 떨어질 수 있어요. 웬만해서는 네이밍 컨벤션 통일해주세요!

}

class Adapter(private val data: MutableList<Item>) : RecyclerView.Adapter<Adapter.ViewHolder>() {
class Adapter(private val data: MutableList<Item>, private var name_view:TextView, private var time_view:TextView) : RecyclerView.Adapter<Adapter.ViewHolder>() {

Choose a reason for hiding this comment

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

recyclerview의 아이템 변동 사항이 없다면 MutableList 보단 불변 List를 사용하는 게 좋습니다!
불변성을 보장해 데이터 무결성을 유지할 수 있어용

class PlayMusic : Service() {

private var mediaPlayer: MediaPlayer? = null
private val channel1 = "channel1"

Choose a reason for hiding this comment

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

companion object로 선언해주는 게 좋아보입니당

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