The user must login through the WebView. Of course, the session is for that WebView.
But, what if I need to make REST API calls during my Android application?
Those REST API calls need the session to be authenticated , otherwise those will not work. Is there any way I can attach the cookies of WebView into everything I do in Android?
It is possible you can use
CookieManager.getInstance()to get access to the cookie in yourWebView, then add it to theHttpClientCookieStore. So long as you keep using that same instance of theHttpClientobject, it will continue to use that sameCookieStoreand will use the cookie. However, if that cookie changes viaWebView, you will need to go get it again. I have not tried this and do not know what problems you may encounter.