cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8768) if MainActivity is killed by Android OS after a plugin started a new activity onActivityResult gets called before the plugin needed to handle the result is loaded
Date Tue, 31 Mar 2015 17:19:56 GMT

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

ASF GitHub Bot commented on CB-8768:
------------------------------------

Github user thehuijb commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/171#discussion_r27500998
  
    --- Diff: framework/src/org/apache/cordova/CordovaWebViewImpl.java ---
    @@ -500,6 +500,7 @@ public void onPageFinishedLoading(String url) {
     
                 clearLoadTimeoutTimer();
     
    +            cordova.onCordovaInit(pluginManager);
    --- End diff --
    
    Applied your suggestions,
    please review once more.
    
    thanks in advance
    
    > On 31 Mar 2015, at 16:13, agrieve <notifications@github.com> wrote:
    > 
    > In framework/src/org/apache/cordova/CordovaWebViewImpl.java <https://github.com/apache/cordova-android/pull/171#discussion_r27482230>:
    > 
    > > @@ -500,6 +500,7 @@ public void onPageFinishedLoading(String url) {
    > >
    > >              clearLoadTimeoutTimer();
    > >
    > > +            cordova.onCordovaInit(pluginManager);
    > I'm not sure it makes sense to wait until onPageFinished to dispatch onCordovaInit.
Why not dispatch at the end of the .init() function?
    > 
    > If the concern is that you want to be able to communicate with the JS, I don't think
onPageFinished guarantees that. Instead, you should have your plugin wait for an exec() to
come in from the JS in order to communicate with it on start-up.
    > 
    > —
    > Reply to this email directly or view it on GitHub <https://github.com/apache/cordova-android/pull/171/files#r27482230>.
    > 
    



> if MainActivity is killed by Android OS after a plugin started a new activity onActivityResult
gets called before the plugin needed to handle the result is loaded
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-8768
>                 URL: https://issues.apache.org/jira/browse/CB-8768
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Serge Huijben
>
> if one of the plugins launches startActivityForResult and the Android OS decides to kill
our MainActivity. what happens when the launched activity is closed.
> the previous activity (our MainActivity is relaunched and onActivityResult is called,
our mainActivity however has not yet had the time to load all onload=true plugins so therefore
the savedInstanceState callBackService can not be called.



--
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


Mime
View raw message