1. #1
    Sencha User
    Join Date
    Jul 2012
    Location
    Bangalore
    Posts
    113
    Vote Rating
    0
    kramprabhu is on a distinguished road

      0  

    Default Ext.Img not loading in device

    Ext.Img not loading in device


    Hi

    I just testing the Ext.Img for my application, when I load image from internet, it shows both in browser and mobile device. But if I use local image, then it only shows in browser not in mobile device.

    items: [
    {
    xtype: 'image',
    height: 67,
    width: 66,
    src: 'http://www.sencha.com/assets/images/sencha-avatar-64x64.png'
    }
    ]






    items: [
    {
    xtype: 'image',
    height: 67,
    width: 66,
    src: 'asset/icons/icon.png'
    }
    ]

    src: 'http://www.sencha.com/assets/images/sencha-avatar-64x64.png' is working fine.

    src: 'asset/icons/icon.png' not loading in mobile device.

    Please let me know how to fix this.

    Regards
    -Ram

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    This is probably because the path to the image is wrong or the resource has not been included by the native packager. The packager, by default, only includes these resources (excerpt from app.json):
    Code:
        /**
         * Extra resources to be copied along when build
         */
        "resources": [
            "resources/images",
            "resources/icons",
            "resources/startup"
        ],
    Either change the location of the resource or edit the app.json to reflect the location of your resource.
    I usually put everything in resources/images. So I'm fine with the Sencha defaults.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Location
    Bangalore
    Posts
    113
    Vote Rating
    0
    kramprabhu is on a distinguished road

      0  

    Default


    Hi.. When I create application from Sencha Architect I dont get app.json file.. I only get packager.json using sencha build command. Is both are same?

  4. #4
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    I think you have app.json. Only it is generated / maintained by Architect directly. But when you have a look on file system level you should see it.

    And no, it's absolutely not the same as packager.json.

  5. #5
    Sencha User
    Join Date
    Jul 2012
    Location
    Bangalore
    Posts
    113
    Vote Rating
    0
    kramprabhu is on a distinguished road

      0  

    Default


    I am just executing "sencha package run android_config.json" command and generating".apk" file.
    This .apk file I am coping to my android mobile device.
    Once installing there.. I am not able to see the images.
    -Ram

  6. #6
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    You are correct - my apologies. I thought that it's handled the 'normal' way.

    I upgraded my Architect to V2.1 (haven't used it for some time now) and did a quick test. Within my project structure I created a folder called images and put an image "image01.png" in there. Then I dropped an image component into a panel and put as source "images/image01.png". The image was shown in both architect and in my browser. Then I published the project and everything was still fine.

  7. #7
    Sencha User
    Join Date
    Jul 2012
    Location
    Bangalore
    Posts
    113
    Vote Rating
    0
    kramprabhu is on a distinguished road

      0  

    Default


    Did you tried creating package file (.apk) file.

  8. #8
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    yes, and I can see the image in the app on my smartphone.

    Initially I had a few problems. But after reading this http://www.sencha.com/forum/showthre...-Sencha-Cmd-v3 and a few trials I managed to build the apk from my little Architect project.

  9. #9
    Sencha User
    Join Date
    Jul 2012
    Location
    Bangalore
    Posts
    113
    Vote Rating
    0
    kramprabhu is on a distinguished road

      0  

    Default


    Did Sencha Architect created app.json file for you?
    If so can you give me the steps how you created .apk files and how app.json got created using Architect.
    -Thanks

  10. #10
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    Quote Originally Posted by kramprabhu View Post
    Did Sencha Architect created app.json file for you?
    No, not Architect did that! I used CMD3 to build the skeleton of a new project/app and then let Architect save into that project (project names should match!). After that I did a few modifications in Architect, saved all and then built the APK with CMD3 (no success so far to do that from within Architect).

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi