Open
Conversation
kongwoojin
reviewed
Jul 1, 2025
| holder.titleTextView.text = item.name | ||
| holder.artistTextView.text = item.artist | ||
|
|
||
| val totalTime = item.duration/1000 |
Contributor
There was a problem hiding this comment.
별도의 확장함수로 분리하는게 좋을 것 같습니다
| import kotlinx.coroutines.launch | ||
|
|
||
|
|
||
| class AudioListManager(application: Application) : AndroidViewModel(application) { |
Contributor
There was a problem hiding this comment.
ViewModel 사용을 시도한 것은 좋은데, ViewModel은 이렇게 사용하면 안됩니다.
자세한건 13주차 아키텍쳐에서 설명하겠습니다.
| import androidx.core.app.NotificationCompat | ||
|
|
||
|
|
||
| @Suppress("DEPRECATION") |
|
|
||
|
|
||
| @Suppress("DEPRECATION") | ||
| class AudioPlayer : Service() { |
|
|
||
| private fun showNotification(title: String) { | ||
| val channelId = "music_channel" | ||
| val channelName = "음악 재생 채널" |
Contributor
There was a problem hiding this comment.
채널 id와 이름은 일반적으로 상수로 선언합니다
| super.onCreate(savedInstanceState) | ||
| setContentView(R.layout.activity_main) | ||
|
|
||
| permissionName = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { |
Contributor
There was a problem hiding this comment.
READ_MEDIA_AUDIO랑 READ_EXTERNAL_STORAGE 허용 창이 뜨지 않습니다.
확인 부탁드려요
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.
10주차 과제 제출입니다.
'첫 화면 하단에 현재 재생중인 음악을 표시한다'라는 부분을 구현하는데 실패하였습니다.
recyclerView를 전체 재생목록과 현재 재생중인 음악으로 나누어서 구현해보려 했는데 생각처럼 작동하지가 않네요.
일단 현재 완성한 부분을 먼저 올린 후 해당 부분 구현을 성공한다면 추가적으로 제출해보도록 하겠습니다.
추가로 strings.xml 사용이나 지난주에 말씀하셨던 'string의 naming convention을 xml id값과 동일하게 하지 않는다' 부분을 추가적으로 설명 해주실 수 있으신가요?
어느 부분에서 strings.xml을 사용해야 하는지와 지난주 말씀하신 내용과 같은 부분을 아직 정확하게 잘 모르겠습니다.