Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    17
    Vote Rating
    0
    Peter Prikryl is on a distinguished road

      0  

    Default Sencha Touch application not working with Cordova on Android

    Sencha Touch application not working with Cordova on Android


    Hello Sencha team,

    I am trying to use Cordova (PhoneGap) with ST 2, but the deployed application shows only the loading indicator with no error messages. The application works in the desktop browser, it also works in the Android browser. I thought the problem is somewhere in my application, but empty ST 2 application behaves the same way. Without Cordova, the application works as expected. I am not sure if this is a bug in ST 2 or in Cordova (or just my fault).

    My environment is Windows 7 (64-bit), Sencha Touch 2.0.1, Sencha Command 2.0.2.

    I think that all I did was pretty standard stuff and it should work. There are no errors in the LogCat or anywhere else. I am clueless about how to diagnose this issue.

    It would be great if someone could try the same steps and tell me whether it works for him or not. Or any hints how to solve this problem. I am beginning to wonder, if there is anyone with functional Android ST 2 application that uses Cordova...

    The details follows:

    As first, I have created new application with command `sencha generate app -n Test -p C:\test`. Then I added cordova-1.6.1.js to the same directory as app.js or index.html. In the index.html, I added the script tag referencing cordova-1.6.1.js just after the style element. I also modified app.json - I added { "path": "cordova-1.6.1.js" } in the "js" definition as the first item. after that I built it with `sencha app build production`

    Next step was to create the Android application. I created a project in Eclipse that builds the Android application - added assets from the build/production, added the cordova-1.6.1.jar and all other stuff. Then I deployed it to the emulator and only the loading indicator is shown after running the application.

    When I remove the cordova js file from the assets (or when I remove the script tag with reference to that file), everything works as expected. But also I cannot use Cordova features. I also tried it with cordova-1.7.0 with same results.

    I will provide more information if needed.

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Location
    Denver, CO
    Posts
    26
    Vote Rating
    1
    CarlosMS is on a distinguished road

      0  

    Default


    Peter, I do have a working ST 2.0.1 FINAL + PhoneGap 1.7.0 application running in both Android AVDs and devices. It is the exact same application I used in the context of the following thread: http://www.sencha.com/forum/showthread.php?192703-st2-app-cordova-phonegap-1.5&p=792848&viewfull=1#post792848

    Although in that thread I describe the steps in the context of an iOS/Xcode deployment, they also apply to an Android/Eclipse deployment. Key things to keep in mind as you read the steps in the post:
    • We just created a fresh Eclipse Android project using these instructions (http://phonegap.com/start#android), the new Android project was created in the folder /Projects/MyApp-Android, and we get the "Hello World" displayed as described in that link when running in the Android emulator.
    • When running the Sencha application package build, following the example in that thread, the command to use would be as follows:
      Code:
      sencha app build package /Projects/MyWishList-Android/assets/www
    This information would make sense in the context of the thread I pointed.

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    17
    Vote Rating
    0
    Peter Prikryl is on a distinguished road

      0  

    Default


    Ok, good to know there is someone with working ST2 + Cordova Android application. I do not see anything special in the instructions, except of using package build instead of production. I will try that although I do not think it will help. Maybe tomorrow I will upload the non-working test application, so anyone can check the code.

    The worst thing is, there is no error message anywhere. I would like to understand, why it does not run the application. If only there was a way to step through JavaScript code in the WebView, stop when the first chance exception occurs or somehow find out where the problem is...

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Location
    Denver, CO
    Posts
    26
    Vote Rating
    1
    CarlosMS is on a distinguished road

      0  

    Default


    Yes, there are key differences between a Sencha package build and a production build: the former produces a self-contained package with the embedded microloader without the need of a remote web server; the later produces a package that is expected to live on a web server, relies on it for file updates, yet can be run in offline mode.

    When packaged with PhoneGap for native install/distribution, an application using the files produced by a Sencha production build will behave exactly as you describe.

    For a description of the different Sencha build types check the Deploying Your Application section here: http://docs.sencha.com/touch/2-0/#!/guide/command

  5. #5
    Sencha User
    Join Date
    Mar 2011
    Posts
    17
    Vote Rating
    0
    Peter Prikryl is on a distinguished road

      0  

    Default


    CarlosMS, thank you for your help. So it was my fault after all - when using package build, it seems to work correctly. Thanks once again, I probably would not notice it myself.

  6. #6
    Sencha User
    Join Date
    Mar 2012
    Location
    Denver, CO
    Posts
    26
    Vote Rating
    1
    CarlosMS is on a distinguished road

      0  

    Default


    Yep, no problem!

  7. #7
    Sencha User
    Join Date
    Feb 2012
    Location
    Illinois
    Posts
    93
    Vote Rating
    2
    bwags is on a distinguished road

      0  

    Default Thank you!

    Thank you!


    I've been struggling with this for easy a full day now. This is exactly the post I needed to look at.

    Thanks!!!

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar