1. #1
    Sencha User
    Join Date
    Sep 2014
    Location
    italy
    Posts
    7
    Vote Rating
    0
    riccardotreagles is on a distinguished road

      0  

    Default images not displayed on device

    images not displayed on device


    I can create apk file using cordova. In chrome,app load image. But in device,app doesn't show image. I used the xtype image and assigned src property, but the problem appens also with html tag. Can you help me?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    898
    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


    Use a remote debugger to see if any errors or warnings are thrown. Is the image local or remote? If remote, you may have to whitelist the domain (and I'd suggest having it local for offline support).
    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
    Sep 2014
    Location
    italy
    Posts
    7
    Vote Rating
    0
    riccardotreagles is on a distinguished road

      0  

    Default


    The image is local, i use setSrc(imgpath); where imgpath is for example "resources/custom/test.png". I build with cordova and i obtain apk. when i install on device, the image is not showed.

  4. #4
    Sencha User joshmorony's Avatar
    Join Date
    Jan 2014
    Posts
    36
    Vote Rating
    4
    joshmorony is on a distinguished road

      0  

    Default


    Make sure the resources folder / image files are being copied over into the .apk build

  5. #5
    Sencha User
    Join Date
    Sep 2014
    Location
    italy
    Posts
    7
    Vote Rating
    0
    riccardotreagles is on a distinguished road

      0  

    Default


    Ok I solved. I added my personal image folder "resources/custom" in app.json file under tag "resources".
    Thanks!