Example using volley saving cookie
1 - Import volley.jar
from libs path to your project
2 - Import compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.3'
in your build.gradle dependencies
3 - Use these project classes for http requests like a normal Volley request
This is not my own whole code. I just needed something like this and I wrote some codes from stackoverflow.