Android examples for android.content:ClipboardManager
get Clipboard Text Legacy
import android.content.Context; public class Main { static String getClipboardTextLegacy(Context ctx) { String txt = null;//from w ww . j a v a 2 s . c o m android.text.ClipboardManager clipboard = (android.text.ClipboardManager) ctx .getSystemService(Context.CLIPBOARD_SERVICE); if (clipboard != null) { txt = clipboard.getText().toString(); } return txt; } }