Glide can't load file from internal storage

Viewed 11796

I have an Activity in which I download a zipfile of images and then unzip in the getFilesDir(). Path is like this :

/data/user/0/packagename/files/files/example.png

When I try to load these images however, they're not showing. I'm using this code to get the path and load the image:

   String loc = getFilesDir().getPath() + "/" + Config.IMAGES_LOCATION +"/";
   String imageloc = loc + model.getThumbnail();
   Glide.with(ActivityImageGallery.this).load(imageloc).into(image);

The imageloc path is the same as the save location and when creating a file from the path, it shows that it would exist.

I tried using file:// in front of the path, but that doesn't work either. WRITE_EXTERNAL en READ_EXTERNAL permissions are asked and granted.

5 Answers
Related