cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bnaya (JIRA)" <>
Subject [jira] [Commented] (CB-8917) Add api/way to get plugins results even when Cordova activity restarts
Date Wed, 28 Oct 2015 11:02:27 GMT


Bnaya commented on CB-8917:

I think this issue of killed webviews is critical and must not be ignored.
its not uncommon and a lot of developers are unaware to that, what lead to low quality apps
and frustrated users.
Maybe to add plugin development guideline about that, and encourage  the plugin developers
to add a method to retrieve results that the plugin failed to deliver. 
and supply boilerplate code for that in the android plugin class.
That way you won't add any android specific cordova api, but letting the developers the awareness
to that issue.
and general guideline for the android platform that the webview activity might be killed if
any other activity is opened. 

Thanks for you response i've waited long time to see any response for this issue :)

> Add api/way to get plugins results even when Cordova activity restarts  
> ------------------------------------------------------------------------
>                 Key: CB-8917
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>            Reporter: Bnaya
> In android when you have a plugin that opens new activity the CordovaActivity will be
killed and you won't get the result from the plugin.
> The new activity will get the results but because the plugin objects are dead and the
webview reloaded you can get the data to the js callback.
> The most noticeable example is the camera plugin. (And maybe its the same with even more
> possible solution for this is to add metadata to the device ready event with incoming
data from plugins.
> I see that this code:
> is trying to do some recovery but from some reason
> ```
> if(callback != null) {  
> ```
> fails. maybe the plugins didn't loaded yet?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message