I am looking for a simple way to pass a session id from android(java) to php. The session id should be "used" automatically and I can access the session data via php. Like $var = $_SESSION['username'];
I found this out (https://stackoverflow.com/a/21271347/10089811):
DefaultHttpClient httpclient = new DefaultHttpClient();
CookieStore cookieStore = new BasicCookieStore();
httpclient.setCookieStore(cookieStore);
HttpStack httpStack = new HttpClientStack(httpclient);
RequestQueue requestQueue = Volley.newRequestQueue(context, httpStack);
But the session id is not set. Is there a way to set the session id to this cookieStore? I also looked at this post but it didn't worked for me and it's not the elegant way I am looking for.