I am working on a project where about 30 accounts are logged-in on Android Kiosk devices that run on the production line of an industrial complex, 24/7, all year-round. My app settings are configured to stay logged-in at all time, without the inactivity timeout.
Since this system required high availability and reliability, I use the KTL library to generate heartbeats on those machines at intervals of 60 seconds, so I can assess their presence and sanity at all time. If I miss 3 heartbeats, I declare the device dead and trigger an audio alert and send notification emails. The heartbeats are sent in the background via API calls in an invisible iframe.
The problem is that after 14 days, the login expires and I get the 401 error on API calls or view refreshes. So far, the only thing I managed to do is a forced log-out by code and reboot the device, which auto logs-in by itself.
Now, I’d like to know if there’s a way to use Javascript to tell Knack to “silently” refresh the account’s log-in for another 14 days so the 401 error never shows up and the user never disturbed in his work.
Thanks for your help,
Normand D.