Search code examples
androidwebviewhybrid-mobile-app

does Webview remember the session information?


I am using one of those online application builders to build an android application. But from what i have researched, online application builders are used to build hybrid mobile applications. Since these are HTML files, they use the inApp browser and are rendered in WebView. So, My question is - Is webview/inApp Browser capable of remembering the session information? suppose I have users log into a website by displaying it in a webview. Will the users be still logged in if they visit the website a second time? When I test these applications in an online environment running inside a fully-fledged browser, the application seems to remember the user. I suspect this is because the test environment itself is contained within the browser which stores the session information. So, If a user was to sign into a website on a real device, will he/she be required to sign in every time the user launches an application? or will he/she remain signed in until sign out?


Solution

  • It depends on Which platform you are using to create app. Each online platform carries their own implementation policy.

    Android provides Javascript Interface for interaction between javascript code in html and java code.

    Is webview/inApp Browser capable of remembering the session information?

    Yes,Session can be stored in app itself using javascript interface.

    Environment of inApp Browser and External browser is total independent until cookies are used.

    If a user was to sign into a website on a real device, will he/she be required to sign in every time the user launches an application?

    Depends on implementation. If app is designed to save login session then user will not be asked to sign in again.