I am using the blow code to copy image to clipboard but when i am trying to past it in another application so only the path is paste not the image.
private void copyImageToClipBoard(File mFile1) {
ClipboardManager mClipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
ContentValues values = new ContentValues(2);
values.put(MediaStore.Images.Media.MIME_TYPE, "Image/jpg");
values.put(MediaStore.Images.Media.DATA, mFile1.getAbsolutePath());
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 have checked so many post on this but still not getting desire solution. Can any one tell me please how to do it?