I am retrieving picture files from my server by downloading the file first to the device and then showing it. But if the file is not there then it crashes. How can I not have the app crash if the file is not there to download?
Thanks,
Warren
I am retrieving picture files from my server by downloading the file first to the device and then showing it. But if the file is not there then it crashes. How can I not have the app crash if the file is not there to download?
Thanks,
Warren
It’s hard to say without seeing how you are downloading the files, but you can use event.isError in your listener function: https://docs.coronalabs.com/api/library/network/download.html#download-and-display-remote-image
It’s hard to say without seeing how you are downloading the files, but you can use event.isError in your listener function: https://docs.coronalabs.com/api/library/network/download.html#download-and-display-remote-image