Android removes pop-up video viewing message

I want to remove the “Sorry this video cannot be played” pop-up from the video clip in my application. I do not want error messages displayed in my application.

+1
source share
1 answer

Set ErrorListener to VideoView and return true , and now the error will not be displayed.

i.e:

 yourVideoView.setOnErrorListener(new OnErrorListener() { public boolean onError(MediaPlayer mp, int what, int extra) { return true; } }); 
+12
source

All Articles