Android Utililty Methods Clipboard Get

List of utility methods to do Clipboard Get

Description

The list of methods to do Clipboard Get are organized into topic(s).

Method

CharSequencegetText(final Context context)
get Text
if (context == null)
    return null;
return ((ClipboardManager) context
        .getSystemService(Context.CLIPBOARD_SERVICE)).getText();
StringgetContent(Context context)
get Content
if (context == null) {
    return "";
ClipboardManager cbm = (ClipboardManager) context
        .getSystemService(Context.CLIPBOARD_SERVICE);
String text = "";
if (cbm != null && !TextUtils.isEmpty(cbm.getText())) {
    text = cbm.getText().toString().trim();
...