Kaustubh Kadam
Kaustubh Kadam

Reputation: 182

load images from string url and open them in gallery

I am getting the image url in string format from a webservice, i am displaying these images in my app, but when the user clicks on it i want them to load in the users default gallery.I have used the following intent but this doesnt work

Uri path = MediaStore.Images.Media.EXTERNAL_CONTENT_URI.buildUpon().appendPath(jsImage.getJsImageServerUrl()).build();
Intent intent = new Intent();
            intent.setAction(Intent.ACTION_VIEW);
            intent.setDataAndType(path, "image/*");
            getActivity().startActivity(intent);

Upvotes: 0

Views: 125

Answers (1)

Zaid Qureshi
Zaid Qureshi

Reputation: 1213

Please look at this answer or this method to save an Image. I am guessing you know already how to detect the click. Then to save it, just use that answer. Hope this helps.

Upvotes: 2

Related Questions