How to keep the seek bar persistent even after back button is pressed and re opened player activity
i am trying to create a music app. the seek bar in the media player is not working if i pressed back button and reopen the activity again.
could anybody help me to solve this problem?
here is My play pause button code
binding.playBtn.setOnClickListener {
if (isPlaying){
mediaPlayer?.pause()
isPlaying = false
length = mediaPlayer!!.currentPosition
}else{
mediaPlayer = MediaPlayer()...