Set text and get text from clipboard

On Android, I need code to “get text” and “set text” to the clipboard.

For example, I want to put "asd" in memory and then paste it from the clipboard.

+44
android clipboard
Jul 11 2018-11-11T00:
source share
1 answer
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); clipboard.setText("Text to copy"); clipboard.getText(); 
+71
Jul 11 2018-11-11T00:
source share



All Articles