Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In galaxy tab , onCompletionListener of videoView is not getting called

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?

like image 252
user2526886 Avatar asked Jun 27 '13 06:06

user2526886


1 Answers

Two comments.

  1. 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.

  2. 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.

like image 58
Zephyr Avatar answered Nov 10 '22 07:11

Zephyr