Android Clipboard Paste getClipboard(Context context)

Here you can find the source of getClipboard(Context context)

Description

get Clipboard

Declaration

@SuppressWarnings("deprecation")
    public static String getClipboard(Context context) 

Method Source Code

//package com.java2s;
import android.content.Context;

public class Main {
    @SuppressWarnings("deprecation")
    public static String getClipboard(Context context) {
        android.text.ClipboardManager clipboard = (android.text.ClipboardManager) context
                .getSystemService(Context.CLIPBOARD_SERVICE);
        return clipboard.getText().toString();
    }//from   w  w w  .  j  a v a 2s .c  om
}

Related

  1. paste(Context context)
  2. copyStringToClipboard(Context context, String string, int toastText)
  3. paste(Context context)
  4. pasteText(Context context)