I've been all day trying to make Volley work with my php session, I've tried all the examples on the web but I don't walk. (included this: Using cookies with Android volley library)
My PHP code is as simple as this:
<?php
require_once( $_SERVER['DOCUMENT_ROOT'] . "/session.php" );
$_SESSION["value"]++;
echo $_SESSION["value"]
?>
My Android code
StringRequest stringRequest = new StringRequest(Request.Method.POST, url,
new Response.Listener<String>()
{
@Override
public void onResponse(String response) {
// response
Log.d(TAG,"Response" + response);
}
},
new Response.ErrorListener()
{
@Override
public void onErrorResponse(VolleyError error) {
// error
}
}
)
My answer is always 1
I made my own methods to get and set Cookies into headers, but I also have the problem with multiple Set-Cookie (Android Volley, duplicate Set-Cookie is overridden)
Any suggestion?