[
https://issues.apache.org/jira/browse/CB-8917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15120253#comment-15120253
]
Dan Polivy commented on CB-8917:
--------------------------------
[~riknoll] I believe it is getting into the JS side of things, but the issue is
that my `resume` handler isn't registered at the time that the event is fired
from cordova.js. Using console.log, I can see that `onMessageFromNative()` is
called and the event is fired, but that happens before I've called
`document.addEventListener('resume', onResume, false)`.
I subscribe to `resume` from within my `ondeviceready` handler. I find that if
I do it before `ondeviceready` is signalled, then the resume handler doesn't
get called at all (verified just by powering the screen off/on). Is that
expected?
> 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
> Assignee: Richard B Knoll
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]