Here you can find the source of getContent(Context context)
public static String getContent(Context context)
//package com.java2s; import android.content.Context; import android.text.ClipboardManager; import android.text.TextUtils; public class Main { public static String getContent(Context context) { if (context == null) { return ""; }//from w w w. j a v a 2 s. c om ClipboardManager cbm = (ClipboardManager) context .getSystemService(Context.CLIPBOARD_SERVICE); String text = ""; if (cbm != null && !TextUtils.isEmpty(cbm.getText())) { text = cbm.getText().toString().trim(); } return text; } }