So why remote connections have a reputation for being untrustworthy.
There may be several reasons for this, but it is best to consider these links as untrustworthy and determine how the application should behave.
I would use ThreadPoolExecutor and fetch the background image and extract them using Future. Since you can often fix this by repeating, run it to try again a couple of times.
You can wrap this class that returns the default image before loading the real image. You can then decide to retry the image in another session when it fails, despite trying to retry.
source share