Using VideoView, how to remove "can't play this video" alert message? Using VideoView, how to remove "can't play this video" alert message? android android

Using VideoView, how to remove "can't play this video" alert message?


Returning false or not having an OnErrorListener at all will cause the OnCompletionListener to be called.

So return true instead of false from the function and no error will be shown, i.e.

video.setOnErrorListener(new OnErrorListener() {    @Override    public boolean onError(MediaPlayer mp, int what, int extra) {        Log.d("video", "setOnErrorListener ");        return true;    }});

For more info see Android Document