[
https://issues.apache.org/jira/browse/CB-8917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15014638#comment-15014638
]
ASF GitHub Bot commented on CB-8917:
------------------------------------
Github user riknoll commented on the pull request:
https://github.com/apache/cordova-android/pull/239#issuecomment-158224722
@Bnaya That is correct and it was intentional. Is there a need for
extending this to all plugin callbacks currently pending? The way I see it, the
burden is on the app developer for being careful about what plugins are
launching external Activities and maintaining their state accordingly (for
example, not launching the camera activity while waiting on a file transfer).
Plugins have access to the Activity lifecycle on the native side, so they
should be able to handle whatever is happening. I guess plugins lose the
ability to notify the javascript side about what's going on, (like a file
transfer failing) but hopefully the app developer is being careful so that
those situations don't occur.
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]