Set text and get text from clipboard
AndroidClipboardAndroid Problem Overview
In Android, I need some code to "get text" and "set text" in the clipboard.
For example I want to put "asd" in memory and after that paste it from clipboard.
Android Solutions
Solution 1 - Android
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
clipboard.setText("Text to copy");
clipboard.getText();