In galaxy tab , onCompletionListener of videoView is not getting called
Asked Answered
B

2

24

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?

Baillargeon answered 27/6, 2013 at 6:48 Comment(3)
Did you see something strange in the LogCat? I suggest you to track the playback behavior and than post a full LogCat (any media exception may help)Supernormal
code.google.com/p/android/issues/detail?id=59185 related?Savil
Could we see the listener code?Howzell
C
1

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.

Carlenacarlene answered 20/5, 2015 at 21:16 Comment(0)
U
0

I'm not sure but Just a trick which might solve your problem: find the total length of video and check if current position reached. if condition satisfies, copy code of onCompletion here.

Undervest answered 9/7, 2015 at 6:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.