1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    1
    Jaganlal is on a distinguished road

      0  

    Default Unanswered: Sencha Touch 2 in Android ICS

    Unanswered: 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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,624
    Answers
    3452
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Did you do a build and all your classes required properly?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    1
    Jaganlal is on a distinguished road

      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
    indralaman is on a distinguished road

      0  

    Default I have same problem

    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
    16
    Vote Rating
    1
    Jaganlal is on a distinguished road

      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
    schtoeffel is on a distinguished road

      0  

    Default


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