Automatically retry image requests after regaining network connectivity
See original GitHub issueI am using the code below to load images from a URL into the target imageview When i try to load the images without internet connection,the error image is displayed,then if i turn on internet connection,unlike Glide, Coil doesn’t try to reload the images from the URL.
fun loadImageWithCoil(
target: ImageView,
imgUrl: String?,
placeHolder: Int = R.drawable.profile_pic_placeholder,
errorImg:Int=R.drawable.ic_terrain_black_24dp
) {
target.load(imgUrl) {
placeholder(placeHolder)
crossfade(true)
error(errorImg)
}
}
Is this currently not possible or I’m not doing it right?.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Retrying failed network requests automatically on Android
The complete example code “Retrying failed network requests automatically on Android” can be found in my AndroidBasicLib in sample. screens. ...
Read more >Retry Policy Recommendations - LivePerson Developer Center
This results in a vicious cycle where more and more requests are sent to the resource or service, and consequently its ability to...
Read more >Error handling with DynamoDB - AWS Documentation
The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too...
Read more >Error Handling with Combine and SwiftUI - Peter Friese
Device/network offline; Semantic validation errors; Response parsing errors / invalid URL; Internal server errors. Source Code. If you want to ...
Read more >Task sequence variable reference - Configuration Manager
If the task sequence doesn't reference a boot image package, ... The name of the network connection as it appears in the network...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would assume “lots”. Network connectivity is different from being able to load something from network for various reasons.
Fresco
has tap to reload (after a failure). Maybe coil can do the same ?