I am using Glide library to fetch images from an API. In the case of network connectivity issues, my present implementation just shows the error image. I want to display a toast message if the internet is not present.
About using services: I think it would be an overkill for a simple app to continuously check the internet. Also if images are already on the screen I don't want to raise any alarm. It is only when images are fetched, the notifications should be raised.
I tried to look into Glide's working but was unable to find a good solution.
Precisely, I want to set timeouts for Glide to fetch images. If it fails to do so a toast would be raised to inform user about low internet connectivity. Please suggest how to do so or if there is any other better way to do this.