0

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);
Kaustubh Kadam
  • 182
  • 3
  • 13

1 Answers1

2

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.

Community
  • 1
  • 1
Zaid Qureshi
  • 1,203
  • 1
  • 10
  • 15