How to keep same session in Android for both web service and webviews?
I am developing a hybrid Android application which c开发者_开发问答onsists of Native and Webviews. For some native data retrieval I am using JSON over WCF webHttpBinding. Both services and web pages are under same website.
I am thinking of doing authentication for webservice call by sending back(over SSL) the sessionID back to server and comparing it. But now my webservice call is creating a new session every time, I am thinking of putting in the Application variables. Is there any better way?
Here are few other questions:
- How can I keep the session for the webviews after I have navigated to other activities and come back to webview.
- Is there a way to use one connection for both web services and web pages?
- How can I make a simple authentication for the webservice call for the current user? (I don't want to make DB call)
精彩评论