Java tutorial
//package com.java2s; import android.annotation.TargetApi; import android.content.ClipboardManager; import android.content.Context; public class Main { @TargetApi(11) public static void copy(String content, Context context) { ClipboardManager cmb = (ClipboardManager) context.getSystemService("clipboard"); cmb.setText(content.trim()); } }