Titanium removes a slash from http://?

You must Login before you can answer or comment on any questions.

My code:

weathericon.backgroundImage = 'http://' + url;
This fails in Android, but not iPhone. In the log I get this:
(main) [14287,42330] /data/data/(...)/app_appdata/http:/www.worldweatheronline.com/images/wsymb(...) open failed: ENOENT (No such file or directory)
Notice the missing slash.

What am I doing wrong?

— asked 12 months ago by Simon F
0 Comments

1 Answer

Hi Simon,

If you are using remote url than you have to display in ImageView as url image not any other view.

— answered 12 months ago by Nitin Chavda
answer permalink
1 Comment
  • You're right, I was searching for an alternative way since using an ImageView would give me this error:

    Max retries reached, giving up decoding image source:

    (The image loads fine on iPhone)

    — commented 12 months ago by Simon F

Your Answer

Think you can help? Login to answer this question!