I would like to copy image from my android application to the other android application using clipboard manager. I have researched a lot and read this tutorial but it doesn't cover the image copying part. The below code which copies image but when I am trying to paste, only the image's path is pasted.
ContentValues values = new ContentValues(2);
values.put(MediaStore.Images.Media.MIME_TYPE, "image/png");
values.put(MediaStore.Images.Media.DATA, "/mnt/sdcard/1.jpg");
ContentResolver theContent = getContentResolver();
Uri imageUri = theContent.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
ClipData theClip = ClipData.newUri(getContentResolver(), "Image", imageUri);
mClipboard.setPrimaryClip(theClip);
I tried to past in apps which support image pasting, so I guess the problem is "copy". Any answers and advises would be appreciated.