@Override
    public void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final Bundle bundle = getIntent().getExtras();
        if (bundle != null && !StringUtils.isBlank(bundle.getString(Intent.EXTRA_TEXT))) {
            ClipboardUtils.copyToClipboard(bundle.getString(Intent.EXTRA_TEXT));
            ViewUtils.showToast(this, R.string.clipboard_copy_ok);
        } else if (bundle != null && bundle.getParcelable(Intent.EXTRA_STREAM) != null) {
            ClipboardUtils.copyToClipboard(bundle.getString(Intent.EXTRA_STREAM));
            ViewUtils.showToast(this, R.string.clipboard_copy_ok);
        } else {
            ViewUtils.showToast(this, R.string.clipboard_copy_failed);
        }

        finish();
    }
Helper activity to copy simple content to clipboard
main/src/main/java/cgeo/geocaching/helper/CopyToClipboardActivity.java