I have read previous posts on how to copy text to the clipboard. However, my purpose is to copy a picture, from an ImageView in this case, to the clipboard.
I know how to save an ImageView to a file using a Bitmap/Canvas/OutputStream. Now I want to know how can I save that picture to the clipboard.
I am guessing there has to be some simple method such as (follow pseudocode):
Bitmap image = get_image_from_image_view();
clipboard_instance.setClipboardContents(image);
I find no reference to this in the Android Clipboard or Clipboard Intent documentation.
Can somebody point me in the right direction? Thank you
That concept does not exist in Android. You can put text, a
Uri, or anIntenton the clipboard, not an image.Depending on where the image originated from, you could put a
Uripointing to that image on the clipboard. Whether anything will be able to paste something useful from thisUridepends a bit on the receiving application.