Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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());
    }
}