user1479307
user1479307

Reputation: 83

Android remove the videoview pop up message

I'd like to remove the popup message 'Sorry this video cannot be played' from the videoview in my app. I dont want my app to display any error messages.

Upvotes: 2

Views: 2952

Answers (1)

Vineet Shukla
Vineet Shukla

Reputation: 24031

Set ErrorListener to your VideoView and return true from there and now no error will be shown.

i.e:

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

Upvotes: 16

Related Questions