when started, my android application loads some image from a remote server using an Asynchronous task. Sometimes, when the connection is too weak, it takes a long time to load and it's not great.
how can i add timeout to this task, so that if the activity can't load the images after 10 seconds for example, the user will get an error message