Skip to content

Commit

Permalink
feat : onStop에 pause() 함수 호출
Browse files Browse the repository at this point in the history
  • Loading branch information
2taezeat committed Dec 7, 2023
1 parent b33a432 commit 4c9106f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ class MainActivity : AppCompatActivity() {
connectToMediaSession()
}

override fun onStop() {
player.pause()
super.onStop()
}

private fun connectToMediaSession() {
val sessionToken = SessionToken(this, ComponentName(this, PlaybackService::class.java))
MediaController.Builder(this, sessionToken).buildAsync()
Expand Down

0 comments on commit 4c9106f

Please sign in to comment.