picasso

How to clear cache and Reload Image in Picasso?

时光总嘲笑我的痴心妄想 提交于 2021-02-07 13:21:26
问题 I am using Picasso to load image in my application but i facing a issue that my image URL is same but image is changing from backend calling the same URL but Picasso loading the same image saved in its cache. Now i want to clear the cache for that Image and reload the image again. What i have tried i searched on SO find that we can use picasso.invalidate(fileName); or memoryPolicy(MemoryPolicy.NO_CACHE) but i am getting the error message in code Can't reslove method invalidate Can't reslove

load image picasso open failed: EACCES (Permission denied)

和自甴很熟 提交于 2021-01-29 12:36:32
问题 I want to load an image but I got this error: /storage/emulated/0/productss/Montearci_products/Bracelets/airplane/Brac - 020.jpg: open failed: EACCES (Permission denied) The file is exist. My codes: Picasso.get().setLoggingEnabled(true); Picasso.get().load(muri).into(mimg); my android version is 10. my permissions: <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android

Android Picasso image loading app crash when scrolling RecyclerView

对着背影说爱祢 提交于 2021-01-29 02:44:41
问题 I am using Retrofit to access this Webservice link: https://jsonplaceholder.typicode.com/photos When loading the items in a recyclerview without loading images, the app works fine. However, if I add Picasso code to load the images, the app crashes after scrolling 2 or three times. I get the following error: A/Looper: Could not make wake event fd: Too many open files OR these errors all together: E/Parcel: fcntl(F_DUPFD_CLOEXEC) failed in Parcel::read, i is 0, fds[i] is -1, fd_count is 1,

Android Picasso - Save image locally before viewing it in ImageView

大城市里の小女人 提交于 2021-01-28 18:18:38
问题 I have made an app which shows a list of image. But before, I downloaded all the images to the sdcard, and I show a progress dialog with the number of downloaded files. I'm thinking to optimise the process using Picasso because of many images to download. So no progress dialog. With Picasso, I would like to save the image in my app directory (as a normal downloaded file) before it is shown in the ImageView. I thought to use this code : Picasso picassoInstance = new Picasso.Builder(context)

Android: How to use TextView in placeholder of Glide or Picasso

瘦欲@ 提交于 2021-01-28 03:40:21
问题 i am using Glide or Picasso for loading the image like Glide.with(context).load(POST_IMAGE).placeholder(R.drawable.loading_img).error(R.drawable.bg_480_800).into(image); Picasso.with(context).load("image url").error(R.drawable.bg_480_800).placeholder(R.drawable.loading_img).into(holder.imageURL); In these two, i'm using image as place holder from the drawable folder. Now i want to use text inside the place holder instead of image from drawable folder. So, please help me to load text instead

How to delete all files from Android Picasso cache

牧云@^-^@ 提交于 2021-01-07 10:02:16
问题 I am working on a project where iam using picasso (http://square.github.io/picasso/) to load all the images in a Recycler View, i wanted to remove all the files from the Picasso cache at the time of logging out of the application. Can you please help me how to do that, i dont want to invalidate every single file separately, also where does it save all the files? 回答1: I myself was searching on how to clear the whole cache few days back and stumbled upon it on Stackoverflow itself, cannot seem

Get Bitmap using a Target in Picasso

情到浓时终转凉″ 提交于 2020-12-31 15:38:56
问题 I'm working on movies Android app which get list of movies from an API which provides a poster path for all movies. I want to get the image as Bitmap from the image's URL to save it as a Bitmap variable in the model class. I want to save the image as blob in the DB to retrieve it directly without redownloading it each time the user opens the app. Is that possible? I want to do something like this, but it always returns null. private Bitmap posterBitmap; public void setPosterBitmap () {

Get Bitmap using a Target in Picasso

强颜欢笑 提交于 2020-12-31 15:34:40
问题 I'm working on movies Android app which get list of movies from an API which provides a poster path for all movies. I want to get the image as Bitmap from the image's URL to save it as a Bitmap variable in the model class. I want to save the image as blob in the DB to retrieve it directly without redownloading it each time the user opens the app. Is that possible? I want to do something like this, but it always returns null. private Bitmap posterBitmap; public void setPosterBitmap () {

Get Bitmap using a Target in Picasso

折月煮酒 提交于 2020-12-31 15:33:16
问题 I'm working on movies Android app which get list of movies from an API which provides a poster path for all movies. I want to get the image as Bitmap from the image's URL to save it as a Bitmap variable in the model class. I want to save the image as blob in the DB to retrieve it directly without redownloading it each time the user opens the app. Is that possible? I want to do something like this, but it always returns null. private Bitmap posterBitmap; public void setPosterBitmap () {

Get Bitmap using a Target in Picasso

泄露秘密 提交于 2020-12-31 15:29:23
问题 I'm working on movies Android app which get list of movies from an API which provides a poster path for all movies. I want to get the image as Bitmap from the image's URL to save it as a Bitmap variable in the model class. I want to save the image as blob in the DB to retrieve it directly without redownloading it each time the user opens the app. Is that possible? I want to do something like this, but it always returns null. private Bitmap posterBitmap; public void setPosterBitmap () {