You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by odbol <gi...@git.apache.org> on 2014/10/17 04:02:50 UTC

[GitHub] cordova-android pull request: Fixed javascript not loading when ac...

GitHub user odbol opened a pull request:

    https://github.com/apache/cordova-android/pull/128

    Fixed javascript not loading when activity restarted after exiting with Back button

    I was having some issues with my app (local javascript SPA):
    
    1. Start app. Everything works normally.
    2. Press Back button to exit. Activity exits and is destroyed.
    3. Start app again. Now the HTML shows up, but the Javascript never runs, so nothing works.
    4. Press Home button, activity goes to background (with non-working Javascript).
    5. Start app again. Now Javascript loads and resumes properly. Everything starts working.
    
    This is on KitKat 4.4.4 on a Nexus 5. "KeepRunning" = "false" in the config file.
    
    Pretty simple fix, once I could figure it out. Please let me know if this has other consequences; sorry I can't provide a test case; my app is quite huge.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/odbol/cordova-android master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-android/pull/128.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #128
    
----
commit 76d7af56d8f8918fd0256bc49899a0b00812cc76
Author: odbol <gi...@odbol.com>
Date:   2014-10-17T01:57:07Z

    Fixed javascript not firing/loading when activity restarted after exiting with Back button.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-android pull request: Fixed javascript not loading when ac...

Posted by odbol <gi...@git.apache.org>.
Github user odbol commented on the pull request:

    https://github.com/apache/cordova-android/pull/128#issuecomment-66555987
  
    Actually, I've since found that this is not the best solution - it introduces another bug. Please do not merge.
    
    I have found a better fix; I can try to publish that within the next few days.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-android pull request: Fixed javascript not loading when ac...

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on the pull request:

    https://github.com/apache/cordova-android/pull/128#issuecomment-66557534
  
    Alright, will hold off then. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-android pull request: Fixed javascript not loading when ac...

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on the pull request:

    https://github.com/apache/cordova-android/pull/128#issuecomment-66557603
  
    Please reference CB-8146 if with your better fix :+1: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-android pull request: Fixed javascript not loading when ac...

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on the pull request:

    https://github.com/apache/cordova-android/pull/128#issuecomment-66555726
  
    Created issue for this: https://issues.apache.org/jira/browse/CB-8146.
    
    Nice job tracking this down! I'd go even one step further to what Joe said and claim that `activityState` isn't necessary at all. I'd guess whoever put it in there originally just didn't know about the `isFinishing()` getter :S. 
    
    Going to merge in your change so that you get some credit for tracking it down, then will refactor to just delete `activityState`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] cordova-android pull request: Fixed javascript not loading when ac...

Posted by odbol <gi...@git.apache.org>.
Github user odbol closed the pull request at:

    https://github.com/apache/cordova-android/pull/128


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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