As for the cookies, what I did to keep using URLConnetion (which is the default use case for Volley on API > 8) is to implement a custom class that extends HurlStack (Volley's implementation of an HTTP client using URLConnection), and overriding createConnection(URL url), which is the method used to get a connection prior to every request.
I just added my user agent (none is send by default, using HurlStack), and a cookie (also, isn't managed automatically in HurlStack).
Here's my code for the class:
public class CustomHurlStack extends HurlStack {
public CustomHurlStack() {
super();
}
@Override
protected HttpURLConnection createConnection(URL url) throws IOException {
// Create a connection with custom attributes
HttpURLConnection conn = super.createConnection(url);
conn.addRequestProperty("User-Agent", "myUserAgent/1.0");
conn.addRequestProperty("cookie", "myCookie");
return conn;
}
}
This should be a viable solution, and I'm not sure why Volley doesn't include such a configurable class to use, but oh well, you can create your own in just a minute or so, as described above.