For video view in Android, I have added some media player listener such as onPreparedListener, onCompletionListener etc. But when video get completed then onCompletionListener is not getting called. Also we observe that something onCompletionListener get called and sometime not.
This issue occurs only for Samsung Galaxy tablet OS version 4.1.2. And the same code had worked properly on another Samsung device such as S2, S3, S4 etc.
Does anyone have ideas?
Two comments.
To check whether the VideoView causes the issue. because the OnCompletionListener
interface of VideoView is just a wrap for the MediaPlayer's OnCompletionListener
interface, you can use a MediaPlayer directly to play the video file and check whether its OnCompletionListener works every time.
-if the same thing happens, means MediaPlayer can't play the video file correctly, maybe you need check the onError()
callback thoroughly.
check whether the video file or Uri points to a corrupted video file, you can use the tools like mp4dump to dump the file information.
Hope it helps.
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