title: Supporting cookies in Google Exoplayer
body: <p>I am setting a HttpCookie in my android application associated with a domain within the cookieManager. Then, when I stream HLS videos using exo player, I want this cookie to used for each of the .ts chunk requests.</p>
  
  <p>This is the code, I use to store the cookie in the Application section of the project:</p>
  
  <pre><code>        String url1 = "http://sdtest.vzvisp.com";
          URI auri1 = null;
          try {
              auri1 = new URI(url1);
          } catch (URISyntaxException e) {
              e.printStackTrace();
          }
  
          AppGlobal.cookieManager = new CookieManager(null, CookiePolicy.ACCEPT_ALL);
          AppGlobal.cookieManager.getCookieStore().add(auri1, new HttpCookie("JSESSIONID","aaaMp0uKke4gp"));
          AppGlobal.cookieManager.getCookieStore().add(auri1,new HttpCookie("JSESSIONID1","aaaMp0uKke4gasasasp"));
  
          AppGlobal.currentHandler = CookieHandler.getDefault();
          if (AppGlobal.currentHandler != AppGlobal.cookieManager) {
              CookieHandler.setDefault(AppGlobal.cookieManager);
          }
  </code></pre>
  
  <p>This is an example of a chunk request sent :</p>
  
  <p><a href="http://sdtest.vzvisp.com:22779/AppConfig/SIT/fios/hls/fios/fios_hls_1m_00004.ts?vzSvc=fU2h73FMzhPgj8w0VNqYYsQ3lVZq8jjIWr6Xfrmraq4=&amp;vispVzKey=54038752&amp;vispIconFg=1&amp;vispUsr=ZPq5BrbWoSQm1nsCNTPfBA==&amp;vispAuthSid=CIAAASAIuwE&amp;vispExpTime=1481081538&amp;vispAuthKey=36958733&amp;vispAuthSign=7.23.GMoCIpxmT_k123kT3P8iJxmCF-BWmeiAXQontU11hUI" rel="nofollow noreferrer">http://sdtest.vzvisp.com:22779/AppConfig/SIT/fios/hls/fios/fios_hls_1m_00004.ts?vzSvc=fU2h73FMzhPgj8w0VNqYYsQ3lVZq8jjIWr6Xfrmraq4=&amp;vispVzKey=54038752&amp;vispIconFg=1&amp;vispUsr=ZPq5BrbWoSQm1nsCNTPfBA==&amp;vispAuthSid=CIAAASAIuwE&amp;vispExpTime=1481081538&amp;vispAuthKey=36958733&amp;vispAuthSign=7.23.GMoCIpxmT_k123kT3P8iJxmCF-BWmeiAXQontU11hUI</a></p>
  
  <p>But, when I inspect the packet, I do not see the cookie sent. Can someone kindly help me out ?</p>
  
  <p>Thanks.</p>