Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 42

Thread: Sencha Touch 2 + PhoneGap are not working on Android 4

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1463 in a recent build.
  1. #21
    Sencha User
    Join Date
    Jan 2012
    Location
    Scottsdale, Arizona
    Posts
    7
    Vote Rating
    0
      0  

    Default ST2 - Android 4.03 - Phonegap 1.2 through 1.41

    I am having the same problem with Developing for Android 4.0. Loader is not finding the dependency files and throwing an unknown chromium error. While I agree that there may be a work around for this ... it is not viable for us because we are in our final development stages and need to troubleshoot problems on the actual device itself. These workarounds do not address this. As far as using the SDK builder, our development machines are Windows based machines, thus the Sencha builder is currently of no use to us.

    It is hard to believe that ST2 has made it this far and is about to hit a frozen API Release candidate version with such a significant bug in it. I understand that ice cream sandwich is only about 1% of the market right now, but with its anticipated full release and upgrade to hit all eligible devices in April, you would think that this bug would be a higher priority and would have been resolved by now.

    Even if it turns out to be a phonegap issue, I think it would be smart for the ST team to find a packaging resolution that works well with phonegap.

  2. #22
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
      0  

    Default Planned fix for ST2?

    Given we're at RC2 now, what is the likelihood this is resolved as part of ST2?

  3. #23
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    It has been pushed to be after 2.0.0 GA
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #24
    Sencha User
    Join Date
    Feb 2012
    Posts
    4
    Vote Rating
    2
      2  

    Default

    As far as I can tell it's all because of this Android 3+ bug: http://code.google.com/p/android/issues/detail?id=17535

    In short, ajax fails on file:// requests when the url includes parameters.

    After taking a closer look at Ext.Ajax I found that it includes by default a "cache busting" parameter, therefore the quick solution is to disable it at the top of my app.js with: Ext.Loader.setConfig({ disableCaching: false; }) and Ext.Ajax.setDisableCaching(false); This will at least solve the dynamic loading and most normal ajax calls.

    Next, ajax proxies also insert url params, so I've had to include the following configs when defining them: { noCache: false, enablePagingParams: false }

    Lastly, I noticed that the TreeStore that I was using injects a parameter into the ajax proxy, so I've had to create my own proxy that extends Ext.data.proxy.Ajax and removes params in doRequest().

    This won't fix the bug, it's only a workaround, but it seems to be working fine for me at the moment.

    Hope this helps. =)

  5. #25
    Sencha User
    Join Date
    Nov 2011
    Posts
    88
    Vote Rating
    4
      0  

    Default

    Quote Originally Posted by shanesmith View Post
    As far as I can tell it's all because of this Android 3+ bug: http://code.google.com/p/android/issues/detail?id=17535

    In short, ajax fails on file:// requests when the url includes parameters.

    After taking a closer look at Ext.Ajax I found that it includes by default a "cache busting" parameter, therefore the quick solution is to disable it at the top of my app.js with: Ext.Loader.setConfig({ disableCaching: false; }) and Ext.Ajax.setDisableCaching(false); This will at least solve the dynamic loading and most normal ajax calls.

    Next, ajax proxies also insert url params, so I've had to include the following configs when defining them: { noCache: false, enablePagingParams: false }

    Lastly, I noticed that the TreeStore that I was using injects a parameter into the ajax proxy, so I've had to create my own proxy that extends Ext.data.proxy.Ajax and removes params in doRequest().

    This won't fix the bug, it's only a workaround, but it seems to be working fine for me at the moment.

    Hope this helps. =)
    This works for me. Big thanks. What an annoying bug. Google should put a bit more care in testing

  6. #26
    Touch Premium Member
    Join Date
    Jan 2012
    Posts
    49
    Vote Rating
    1
      0  

    Default Not sure this isn't a sencha touch issue

    I too was running into a similar problem with phonegap and sencha touch and android 2.3 and 3.1, so I created a simple hello world app without phonegap and tried it -- it failed on 3.1, but not with the error I expected. I had beforehand received a "Viewport.js not found error", but this time I got an "Ext" not found error on 3.x only.

    Here is my sample "helloworld" app that works on 2.x and not on 3.x.

    HelloWorld.zip

    Since I am a newbie, the one factor that I am not sure of is the following: My current java project is really based on android 2.3.3, and I deployed it to my 3.1 target machine. Maybe I really do need to make a new java project with 3.x so that I can deploy to the 3.1 target machine -- although I was under the impression that sencha tools do not require this step. Correct me if I am wrong, please.


    Opps, somehow I missed the previous post which explains that this is an android issue. Sorry for the rant. I will try the suggested fix.
    Last edited by luiscortes; 16 Mar 2012 at 7:37 AM. Reason: missed previous post -- demostrating android problem

  7. #27
    Touch Premium Member
    Join Date
    Jan 2012
    Posts
    49
    Vote Rating
    1
      0  

    Default okay, my example was off

    The reason that I was getting a can't find "Ext" error was that the tablet was not connected to the internet -- I know, newbie mistake . In any case, I added these fixes to my index.html file and my program worked on android 3.1.


    Code:
      <script>
            // Fix for problem  with android 3.x and 4.x which is
            // the browser has a problem with urls with ? and this
            // bug has not been fixed by google.  See:
            // http://code.google.com/p/android/issues/detail?id=17535 or
            // http://www.sencha.com/forum/showthread.php?162322-Sencha-Touch-2-PhoneGap-are-not-working-on-Android-4/page3&highlight=Loader
            //
            
            Ext.Loader.setConfig({ disableCaching: false });
            Ext.Ajax.setDisableCaching(false);    
        </script>

  8. #28
    Sencha User
    Join Date
    Aug 2011
    Posts
    88
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by luiscortes View Post
    The reason that I was getting a can't find "Ext" error was that the tablet was not connected to the internet -- I know, newbie mistake . In any case, I added these fixes to my index.html file and my program worked on android 3.1.


    Code:
      <script>
            // Fix for problem  with android 3.x and 4.x which is
            // the browser has a problem with urls with ? and this
            // bug has not been fixed by google.  See:
            // http://code.google.com/p/android/issues/detail?id=17535 or
            // http://www.sencha.com/forum/showthread.php?162322-Sencha-Touch-2-PhoneGap-are-not-working-on-Android-4/page3&highlight=Loader
            //
            
            Ext.Loader.setConfig({ disableCaching: false });
            Ext.Ajax.setDisableCaching(false);    
        </script>
    I can confirm that this fixes the problem for me too, on Android 4.0.3 / Nexus S.

  9. #29
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    187
    Vote Rating
    3
      0  

    Default

    Any chance to get this fix included into the core?

  10. #30
    Sencha User abshnasko's Avatar
    Join Date
    Sep 2011
    Posts
    44
    Vote Rating
    0
      0  

    Default

    Yes please! I spent way too long trying to solve this issue.

    Even after applying the above fix, I'm still seeing arguments being adding to requests to store files:
    ?_dc=1336009801123

    Is this ok?

Page 3 of 5 FirstFirst 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •