I am using Loopj HTTP client to make my http requests to my server (http://loopj.com/android-async-http/). Requests are working perfectly. However, I am trying to implement sessions into the service. From the documentation, enabling cookies through saving data in a sharedpreference store is straight forward. The code goes like this:
AsyncHttpClient client = new AsyncHttpClient();
PersistentCookieStore myCookieStore = new PersistentCookieStore(getActivity());
client.setCookieStore(myCookieStore);
The problem is that whenever I make a request to a script that requires a session, I get null responses as if the user does not have a session id. I am not sure how to debug where the exact problem is. How can I access myCookieStore to check if it is storing and sending the session id. I am trying logging myCookieStore.toString() but that does not give me the data inside.
Thanks.