Android Clipboard Paste pasteText(Context context)

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

Description

paste Text

License

Open Source License

Declaration

public static String pasteText(Context context) 

Method Source Code

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

public class Main {

    public static String pasteText(Context context) {
        android.text.ClipboardManager clipboard = (android.text.ClipboardManager) context
                .getSystemService(Context.CLIPBOARD_SERVICE);
        if (clipboard.hasText()) {
            return clipboard.getText().toString();
        }//from  w ww  .  j  a va  2  s  . com
        return "";
    }
}

Related

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