Keep Alive Perspective app on iphone

I have a perspective app running on an iPhone, there can be 5 - 10 mins between sample collection. During that time, the screen goes blank and the app disconnects from the server. Then they need to log back in to the phone.

Is there a simple keep alive script or setting to keep the phone from hibernating while the app is open. I was thinking of adding a timer script or something similar but before I started doing anything, I wanted to see what you guys have already done. Thanks

The issue you are going to face is the human habit of locking our phones in those situations. Technically this requires minimal Ignition change you could update the phones to never auto lock increase the Perspective timeout limit and try to train people to not lock them if they want it to keep going. You can also increase the Session Timeout General Perspective Project Property: Perspective Project Properties | Ignition User Manual (getting logged out is a separate setting).

But we naturally try to lock phones to save battery and prevent firing in our pocket.

Nothing you put in the app will preserve through the phone OS being locked from what I understand (if someone does have a solution please let me know too).

Instead you have to consider the inputs/reloading of the UI that they are expecting to function, the inputs should go directly to a stable database location and on load of the UI it should always be checking if progress exists to reload and display.

You can try the preventSleep property.

{
  "pullToRefresh": true,
  "preventSleep": false
}

image

That did it, thanks!