Saturday, 6 April 2013

Android System How to copy to clipboard?


  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

Disqus for Android