Error (1,-22) occurs after long playing (about hour or more) the same track in a loop. I can't figure out the reason of that error. Everything is okay if track is playing for short time. But if I keep track playing for long time in my Service
, sometimes the error happens.
I know that 1 is MEDIA_ERROR_UNKNOWN
, but cant find anything about -22.
Any suggestions? API 24
It seems to issue appears because I didn't call MediaPlayer.release()
when onCompletion
callback. As a result resources of MP did not released and finally MP crashed with the error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With