Results 1 to 6 of 6

Thread: Sencha Touch 2 in Android ICS

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    18
    Vote Rating
    1
      0  

    Default Sencha Touch 2 in Android ICS

    Can someone tell me how to pack sencha touch 2 application in Android 4.x and make it work? I tried the following options (nothing seems to work for me)

    i have the following script in my index.html just to see any kind of error
    Code:
    <script>window.onerror = function(error) { alert(error); };</script>
    1. Using eclipse packed Phonegap 1.4.1 with my Sencha Touch 2.0 application (same apk worked like a charm in Android 2.x) - this didn't work on Android 4.x - i get [object Event] in the alert box
    2. Using Sencha native packaging created apk for my application - this didn't work on Android 4.x - here i used to get error saying (The page at 'file://' says: [object Event])

    note:
    My application works fine if accessed from native browser of Android 4.x (ICS)


    Someone please help, any suggestions or hint will be of great help, thanks in advance. Struggling for the past 2 days
    Last edited by Jaganlal; 8 Jun 2012 at 12:35 PM. Reason: My application works fine if accessed from native browser of Android 4.x (ICS)

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

    Default

    Did you do a build and all your classes required properly?
    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

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    18
    Vote Rating
    1
      0  

    Default

    Yes i followed
    HTML Code:
    http://docs.sencha.com/touch/2-0/#!/guide/native_android
    to do a native build on android.
    All my classes are within the build (basically i followed the Android Native Packaging guide from docs.sencha.com). The same apk which i got as output WORKS on Android 2.x BUT NOT on Android 4.x (ICS)
    Do i need to do anything special or different to make the package (apk) work on Android 4.x?.

    Can anyone share a simple hello world sencha touch 2 application (apk), which can work both on Android 2.x and Android 4.x

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default I have same problem

    I have the same problem, I hope soon there is a solution

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    18
    Vote Rating
    1
      0  

    Default

    I put the following code in my index.html
    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>
    and it started working fine.
    Just follow this thread to get more details
    HTML Code:
    http://www.sencha.com/forum/showthread.php?162322-Sencha-Touch-2-PhoneGap-are-not-working-on-Android-4

  6. #6
    Ext JS Premium Member schtoeffel's Avatar
    Join Date
    Feb 2011
    Location
    Frauenfeld, Switzerland
    Posts
    5
    Vote Rating
    0
      0  

    Default

    Ext.Loader.setConfig({ disableCaching: false }); // Worked for me .... Ext.Ajax... wasn't nessesary

Tags for this Thread

Posting Permissions

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