A_rmas
A_rmas

Reputation: 784

android MediaPlayer IO Exception with E(-1003,-403)

I got an url to play video from nimble server with wmsAuth key that is concatenated. When wmsAuth key is fine the video plays well. The logic I am trying to implement is, right after the media-player throws (-1003,-403) on what and extra, I need to refresh wmsAuth key.it worked fine on some devices. But the problem I faced was some devices throw IO exception only not being specific on (-1003,-403). As IO exception carry various exception not being specific to (-1003,-403) the logic cannot be implemented on catch block of IO exception. How can we go to depth of IO exception to handle this scenario?

Upvotes: 0

Views: 384

Answers (1)

solenya
solenya

Reputation: 11

I solved this exception in following way:

  1. Add this line to your Application's onCreate() function

    CookieHandler.setDefault(new CookieManager())
    
  2. Use ExoPlayer for playing your resource

Upvotes: 1

Related Questions