Keep the app running at the background

Hello freinds, I am now running a webview app to read from WordPress. The first page loaded is the wp-admin login. I want to keep users logged in all the time even when the webview app is closed and reopened. What can I do please? Help.

@harst100 Do you still have issues with this?

hi @harst100,
I do not do much wp programming but if you display a wp page in a webview, you need to have something that tells the wp instance that it is still active otherwise it logs you off for inactivity, one way is you can set a timer and refresh the page every n seconds or so if there is no activity so that it does not log you off.

The other issue where you want to keep the users logged in, you need to look at the API if it has a token of some sort that authenticates you, so you can use that to authenticate your user the next time


Hello @jayantvarma, I am very grateful for your support. I have tried to implement this with no success. I was requesting if you could show me just a sample of how to implement this either using a timer or API. Using timer, do you implement it on the wp side or application side?

Hi @harst100,
you would set the timer on the app so that it can keep the connection to wp alive. If you were changing pages on a wp site, it will keep you logged in, inactivity is when you do not do anything, so the when the timer triggers you can refresh the page to keep it active.


Will this still work when you restart your phone/device?

This topic was automatically closed after 166 days. New replies are no longer allowed.