I know that I can use an ACTION_VIEW intent if I have the image saved physically on the device. But in my case I laod the images dynamically from an url, like this:
I fixed it. Basically Glide stores the downloaded image in the cache, and I couldn't get a download file path. So I did the following:
When the user clicks the "share" button I will download the image again (with glide) and save it in a .jpg file in the user's sdcard. Then I will use an ACTION_VIEW intent with the uri of the downloaded jpg.
Then the image stays saved in the user's gallery.