Code example for ClipboardManager

Methods: getText

0
	} 
 
	@Override 
	public void handlePaste() { 
		final ClipboardManager clipboardManager = (ClipboardManager) inputMethodService.getSystemService(Context.CLIPBOARD_SERVICE);
		final CharSequence text = clipboardManager.getText();
		if (!Strings.isEmpty(text)) {
			commitText(text, 1);
		} 
	} 
 
	@Override 
	public void handleCopy() { 
		final InputConnection ic = getCurrentInputConnection();
		AndroidKeyboardUtils.copyTextFromInputConnection(ic, inputMethodService);
	} 
 
	@Override 
	public void clearMetaKeyStates(int flags) {
		getCurrentInputConnection().clearMetaKeyStates(flags);
	}