Restoring application state (on iPhone)

18 views
Skip to first unread message

Youval Bronicki

unread,
Jun 30, 2009, 7:08:27 AM6/30/09
to phonegap
Is there away to have PhoneGap iPhone applications restore their
state?

Since Safari does this for web applications, I am hopeful that this
should be feasible.

Vidal de Wit

unread,
Jun 30, 2009, 7:40:07 AM6/30/09
to phon...@googlegroups.com
SQLLite an option maybe?

2009/6/30 Youval Bronicki <youval....@gmail.com>

Youval Bronicki

unread,
Jun 30, 2009, 8:21:42 AM6/30/09
to phonegap
Hi Vidal,

SQLite is useful for the application to reload itself, but I'm
concerned about start-up time.

I was hoping to reduce the start-up time using whatever mechanism
Safari itself uses to reduce its own start-up time.

Thanks,

Youval

On Jun 30, 2:40 pm, Vidal de Wit <vidal.de...@gmail.com> wrote:
> SQLLite an option maybe?
>
> 2009/6/30 Youval Bronicki <youval.broni...@gmail.com>

David Oliver

unread,
Jun 30, 2009, 11:16:34 AM6/30/09
to phonegap
HTML database support? http://ajaxian.com/archives/html5-features-in-latest-iphone-application-cache-and-database
(requires iPhone 2.0 software or greater)

Jeremy Wadsack

unread,
Jun 30, 2009, 11:30:43 AM6/30/09
to phon...@googlegroups.com
If Safari does this like Firefox then it just reloads the page from the server and re-populates the fields from a persistence storage. You'd probably have to handle that all yourself as I doubt the WebKit includes the same session management. Still, database, file, cookies.... there are several different ways to store data.

http://phonegap.pbworks.com/JavaScript-API#file
Although check the docs in your source code as they will be more up-to-date

http://groups.google.com/group/phonegap/browse_thread/thread/106565923cd0e37e/480f89fd558ef654?lnk=gst&q=cookies#480f89fd558ef654
You'll need to patch your source or ff on Nachoman's tree to get that.

--
Jeremy Wadsack
--
Jeremy Wadsack

Youval Bronicki

unread,
Jul 1, 2009, 4:57:42 AM7/1/09
to phonegap
Thanks ,everybody, for your feedback.

I was hoping to see something more immediate, as you see when you go
from Safari to the home screen and back to Safari.
Jeremy line of thought leads me to suspect that Safari simply keeps
running in memory (and that's a privilege that Apple applications have
over regular iPhone applications).

Youval


On Jun 30, 6:30 pm, Jeremy Wadsack <jeremy.wads...@gmail.com> wrote:
> If Safari does this like Firefox then it just reloads the page from the
> server and re-populates the fields from a persistence storage. You'd
> probably have to handle that all yourself as I doubt the WebKit includes the
> same session management. Still, database, file, cookies.... there are
> several different ways to store data.
>
> http://phonegap.pbworks.com/JavaScript-API#file
> Although check the docs in your source code as they will be more up-to-date
>
> http://groups.google.com/group/phonegap/browse_thread/thread/10656592...
> You'll need to patch your source or ff on Nachoman's tree to get that.
>
> --
> Jeremy Wadsack
>
> On Tue, Jun 30, 2009 at 8:16 AM, David Oliver <oliver.davi...@gmail.com>wrote:
>
>
>
> > HTML database support?
> >http://ajaxian.com/archives/html5-features-in-latest-iphone-applicati...
Reply all
Reply to author
Forward
0 new messages