Picasso Android Studio

1

Good afternoon, I have a problem with the picasso library, since changing the image that comes in the url shows me the previous image and not the current one, is there any way to update the image when the app is opened?

    
asked by Julio César 06.06.2017 в 02:31
source

1 answer

1

Both Picasso and Glide base their function on saving the images in cache, if you want to update the image, you must deactivate the policies to not allow cache:

    Picasso.with(this).load(urlImagen) 
.memoryPolicy(MemoryPolicy.NO_CACHE)
.networkPolicy(NetworkPolicy.NO_CACHE)
.into(imageView); 

What these options do is disable the request of the image first of the memory or cache of the disk.

    
answered by 06.06.2017 в 03:51