You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joe Bowser (JIRA)" <ji...@apache.org> on 2015/10/27 22:48:27 UTC

[jira] [Commented] (CB-8917) Add api/way to get plugins results even when Cordova activity restarts

    [ https://issues.apache.org/jira/browse/CB-8917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14977228#comment-14977228 ] 

Joe Bowser commented on CB-8917:
--------------------------------

That's exactly it.  The plugins have to be loaded if you're going to attempt this.  Even if you can manage to go to the right plugin, you're still totally going to have problems when your recovering your application.  There isn't an easy way for an app to recover the scope once the application has been killed right now.

> Add api/way to get plugins results even when Cordova activity restarts  
> ------------------------------------------------------------------------
>
>                 Key: CB-8917
>                 URL: https://issues.apache.org/jira/browse/CB-8917
>             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 platforms)
> possible solution for this is to add metadata to the device ready event with incoming data from plugins.
> I see that this code:
> https://github.com/apache/cordova-android/blob/3.6.x/framework/src/org/apache/cordova/CordovaActivity.java#L779-L784
> 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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org