Friday, February 10, 2012

How to copy to clipboard in android?

Use this to programatically copy some useful text to the clipboard so that the users can paste it somewhere. 
ClipboardManager clipboard =
(ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
clipboard.setText("Text to copy");

No comments:

Post a Comment