I've been unsuccessfully trying to do the following:
- Use loopj AsyncHttpClient to perform a request to a login page using a post request
- The login page logs the user in and responds with a session cookie
- later, on the same application, I create a webview to open a specific page which needs the user to be logged in. By default the user is not logged in, so my first conclusion is that loopj's library is not sharing the cookies with the remaining application
I've tried a lot of different approaches with no success. The best that I was able to do was to create the persistent cookie store for loopj and then iterate the cookies and recreate them when creating the webview. This works the first time, but if the users logs out in the web view and I try to log in again, the cookies do not refresh.
Bottom line: is there an easy way for both loopj's library and any webview in the same application to share the same cookies/context? Iteration to cookie stores and such is not a solution, this should be pretty straight forward.