Persistence on iOS (and Android)

J. Landman Gay jacque at hyperactivesw.com
Fri Jan 25 14:42:25 EST 2013


On 1/24/13 5:23 PM, Ben Rubinstein wrote:
> Is there such a thing as suspend/resume on iOS, or just startup and
> shutdown?
>
> As far as I can see, when a LC app is suspended and resumed, it's in
> every way restarted.  Unless we save our state explicitly in a
> file/database/stack, and then reconstruct it on startup.  Is that
> correct, or am I missing something?
>
> If that is correct - is the shutdown message a reliable signal that our
> app is going to be backgrounded, on which we can save whatever data we
> need to restore state?  Or do we have to save at every change in state,
> just in case we're about to be suspended?
>
> ... and is it the same approach on Android, or do we have suspend/resume
> there?

There's no suspend/resume, apps always quit. You'll need to save the 
current state so that the next time it opens you can reset everything. 
Startup and shutdown are reliable messages though, and you can plug into 
those.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list