I am developing ios and android application using java script. How to set my app always logged in state. For example,when i login in my app and then i just shutdown my device and then restart, then i click my app again,but it asks for log in. How to make my application always logged in as in Facebook app.Help me
Use Shared Preference for that. When user logged into your application store login status into
sharedPreference and clear
sharedPreference when user click on logged Out.
Check every time when user enter into application if user status from shared Preference is true then no need to login otherwise move to login page.
localStorage to set and get values probably first time login to set userinfo using:
after switch off you try to open your app, at the time use
localStorage.getItem("name") based on that you can load your values.