On Apr 29, 2013, at 1:24 PM, [email protected] wrote:

> Hello Everyone,
> 
> I am new to this forum, but it seems like the right place to ask this 
> question. In the utility code I'm writing, I'd like to be notified that my 
> app is about to quit and then ask the system for some time while I dump my 
> cache into the database (through IndexedDB).

What do you mean exactly by quit? Here are some quit-like situations I can 
think of:
- user shuts down the phone
- your app is killed for using too much memory
- user swipes up to kill the app from the task switcher

I don't know of a reliable way to hook into those events. Would it be possible 
to periodically dump the cache to the db in the background? That might be more 
reliable.

> 
> I see that there is the onunload event, but my understanding is that if I 
> cancel that event, a dialog pops up. This is highly undesirable as I'd rather 
> just postpone quitting (or show my own gui) until my operation is finished.
> 
> Are there apis that would allow me to do this? Any suggestions?
> 
> Thank you very much for your thoughts,
> 
> _ michael
> 
> --- 
> Michael Bishop
> Hitpoint Studios, Inc.
> _______________________________________________
> dev-webapps mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-webapps

_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to