Java tutorial
//package com.java2s; import android.content.Context; import android.text.ClipboardManager; public class Main { public static final int clipboardTextLength(Context context) { ClipboardManager cm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); CharSequence text = cm != null ? cm.getText() : null; return text != null ? text.length() : 0; } }