How to get image path which was copied by Android gallery using Clipboard?
I'm trying to get the uri of the image which is copied from Android gallery.
I'm using the following code to get the uri,
ClipboardManager mClipboard =
(ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
ClipData clip = mClipboard.getPrimaryClip();
if (clip != null && clip.getItemAt(0).getUri() != null) {
**System.out.println(clip.getItemAt(0).getUri());**
}
But its always returning null even if the image been copied to Clipboard.
Someone guide me to workout this.
No comments:
Post a Comment