Re: Android plugin crash on resume when activity destroyed

2015-06-04 Thread Jesse
al level so it doesn't lead to a crash? I guess a > > > >> targeted fix for the Camera plugin, to perhaps detect this and throw > > an > > > >> error dialog, might be a start. I've also seen this with the barcode > > > >> scanner plugin (which us

Re: Android plugin crash on resume when activity destroyed

2015-06-04 Thread Serge Huijben
t; > > -Original Message----- > > From: Serge Huijben [mailto:s.huij...@gmail.com] > > Sent: Wednesday, June 03, 2015 11:39 PM > > To: dev@cordova.apache.org > > Subject: Re: Android plugin crash on resume when activity destroyed > > > > Joe, it fa

Re: Android plugin crash on resume when activity destroyed

2015-06-04 Thread Jesse
m: Serge Huijben [mailto:s.huij...@gmail.com] > Sent: Wednesday, June 03, 2015 11:39 PM > To: dev@cordova.apache.org > Subject: Re: Android plugin crash on resume when activity destroyed > > Joe, it failing on Travis was not caused by the code in the pullrequest. > I just changed one wo

RE: Android plugin crash on resume when activity destroyed

2015-06-04 Thread Dan Polivy
lay with Serge's solution and see if it is viable, and will >> report back what I find. >> >> Dan >> >> -Original Message- >> From: Joe Bowser [mailto:bows...@gmail.com] >> Sent: Wednesday, June 03, 2015 11:44 AM >> To: dev@cordova.apach

Re: Android plugin crash on resume when activity destroyed

2015-06-03 Thread Serge Huijben
>> >> It may also be prudent to update the plugin development guide to discuss >> this issue and how to prevent crashes from referencing uninitialized >> instance variables in the intent callback. >> >> I may also play with Serge's solution and see if it is

Re: Android plugin crash on resume when activity destroyed

2015-06-03 Thread Serge Huijben
revent crashes from referencing uninitialized > instance variables in the intent callback. > > I may also play with Serge's solution and see if it is viable, and will > report back what I find. > > Dan > > -Original Message- > From: Joe Bowser [mailto:bows...

RE: Android plugin crash on resume when activity destroyed

2015-06-03 Thread Dan Polivy
's solution and see if it is viable, and will report back what I find. Dan -Original Message- From: Joe Bowser [mailto:bows...@gmail.com] Sent: Wednesday, June 03, 2015 11:44 AM To: dev@cordova.apache.org Subject: Re: Android plugin crash on resume when activity destroyed This

Re: Android plugin crash on resume when activity destroyed

2015-06-03 Thread Joe Bowser
This has been a problem since we started, and there's no solution to it because there's no reliable way to restore state on a WebView. We have tried in the past, and failed miserably. I'm extremely skeptical that this would even work, since this apparently failed Travis. That said, if it does, e

Re: Android plugin crash on resume when activity destroyed

2015-06-03 Thread Mefire O .
Interesting fix, Serge. A question comes to mind: - Since it seems like this issue affects all android plugins that call other intents, won't we have to do this for all of them? Is there a way we can leverage your PR and maybe come up with a general solution ? Maybe fit the boilerplate code (sta

Re: Android plugin crash on resume when activity destroyed

2015-06-03 Thread Serge Huijben
what I did to solve this is add a check for callbackcontext, If that is null save the incoming parameters. if (this.callbackContext == null) { this.savedRequestCode = requestCode; this.savedResultCode = resultCode; this.savedIntent = intent; } els