Execution stops at a broken image

images

#1

I’ve only been able to test this on Android but when I’m loading my page and content contains an image which is broken (404 error), the whole page stops rendering after that point. The console displays this error

Error in downloadBitmap - java.io.FileNotFoundException: http://mywebsite.com/product_img/thumb-

Is this an intended behavior?

SInce my content is user generated and dynamic, I cannot control the availability of images and guarantee all of them would work. Is there a workaround for the page to continue rendering despite of broken images?


#2

You can of course by checking whether the file existing before setting it.


#3

Its always hints with you…eh? :sweat_smile:

Since the images are being loaded from the website and not part of the app, wouldn’t that make the app sluggish? I mean with 2 network requests for each image? Is there a better way? Is that how android works, or is it a nativescript behavior?


#4

Usually these icons are part of the app, but in your case you will have to at least download them and resize if required, before showing. Otherwise behavior may be same even in Android.


#5

What are you talking about?