Cordova + Ionic App run in background and resume to the last screen -


i'm developing new version of app kind of stopwatch after amount of time make step or reach checkpoint. stopwatch should run hours , hours , hours without stop.

when app works in foreground there no problems when app pass in background strange happens , after amount of time seems app killed, , when come app restarted.

the old app made cordova + sencha touch don't had behavior , stay days running in background (without using plugins this).

i don't need app stay running in background because need know when stopwatch started, come , resume app last screen.

how can do?

thanks!

there many things happen meanwhile app in background, save current app state on app exit/pause event, save clock time.

once user return, somehow read last state, "recreate" last state, check current time , compute time has passed update stopwatch.

you rely on server time instead of device time.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -