public static void copyToClipboard(@NonNull final CharSequence text) {
        final ClipboardManager clipboard = (ClipboardManager) CgeoApplication.getInstance().getSystemService(Context.CLIPBOARD_SERVICE);
        if (clipboard != null) {
            final ClipData data = ClipData.newPlainText(null, text);
            clipboard.setPrimaryClip(data);
        }
    }
Places the text passed in onto the clipboard as text

@param text The text to place in the clipboard.
main/src/main/java/cgeo/geocaching/utils/ClipboardUtils.java