Java tutorial
//package com.java2s; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; public class Main { public static void copy2clipboard(Context context, String text) { ClipboardManager cm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText("clip", text); cm.setPrimaryClip(clip); } }