Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android copy text to clipboard programmatically

import android.content.ClipboardManager;

// ...

ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); 
ClipData clip = ClipData.newPlainText("label", "Text to copy");
clipboard.setPrimaryClip(clip);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #copy #text #clipboard #programmatically
ADD COMMENT
Topic
Name
1+1 =