cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: Cordova Activity Code Changes
Date Fri, 11 Jan 2013 02:31:47 GMT
I'd like to verify if this is the scenario:
1. We invoke an intent that causes another app to take the foreground.
2. Our app is forced to close by the OS due to memory pressures
3. The other app finishes and sends an intent back to us
4. Our app re-initializes, finds the plugin that started the request, and
gives it the result

Assuming I've got this straight, I think there is value in adding in this
code. *if* apps design themselves such that their state is always stored,
then they should have a chance at restoring their state when they
re-launch.

Uncertainties I have:
1. Do we have a chance to give JS some time to run
within onSaveInstanceState? Perhaps we can send a message to the webkit
thread and then just sleep for a second? Perhaps even let it store things
in the Bundle?
2. Upon re-launch, can we signal to the JS that it is "restarting" instead
of starting from scratch?






On Thu, Jan 10, 2013 at 8:18 PM, Joe Bowser <bowserj@gmail.com> wrote:

> BTW: This isn't a JS API change at all.
>
> On Thu, Jan 10, 2013 at 5:18 PM, Joe Bowser <bowserj@gmail.com> wrote:
> > Blargh! Making things merge cleanly has reduced readibility:
> >
> >
> https://github.com/infil00p/cordova-android/commit/5ca233779d11177ec2bef97afa2910d383d6d4a2
> >
> > That's the meat of it.  I'm sure there's more in here, but I mostly
> > want to get the state change code working.  For CordovaWebView, we're
> > probably going to figure out some helper methods to allow users to
> > restore their states, but when you're working on your own Android App
> > with custom views, I think it's safe to say that your intents and
> > states are your own responsibility.
> >
> > On Thu, Jan 10, 2013 at 4:48 PM, Brian LeRoux <b@brian.io> wrote:
> >> Love the functionality conceptually speaking but where is this code
> >> exactly so I can have a look Joe? (There's like a 1000 commits on that
> >> branch and I'm abjectly lazy.)
> >>
> >> On Thu, Jan 10, 2013 at 4:40 PM, Filip Maj <fil@adobe.com> wrote:
> >>> If it works, don't see why not!
> >>>
> >>> On 1/10/13 4:29 PM, "Joe Bowser" <bowserj@gmail.com> wrote:
> >>>
> >>>>Hey
> >>>>
> >>>>I'm wanting to merge some of the state code that I was working on
> >>>>before the break in.  Are people still cool with this?
> >>>>
> >>>>https://github.com/infil00p/cordova-android/tree/CordovaActivity
> >>>>
> >>>>Basically, this lets us restore our state if we got the app killed
> >>>>while we were in Camera.  Assuming that the Camera can store the data,
> >>>>this should get around the Camera issue.  It was called
> >>>>CordovaActivity because I thought we were going to implement the
> >>>>Activity.  This turned out not to be the case.
> >>>>
> >>>>Thoughts?
> >>>>
> >>>>Joe
> >>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message