How to read a line from the clipboard in the code name of one application?

My application sometimes reads text data from the clipboard. I am using code like this that seems to work fine on android.

String pasteText = null;
Object pasteObj = Display.getInstance()
                    .getPasteDataFromClipboard();   

if (pasteObj instanceof CharSequence) {
    pasteText = pasteObj.toString();
}

I am wondering if it is right to use CharSequence, not String? Stringwould seem like an intuitive choice, but didn't work for me when I tried it.

(I have not tried the code on iOS. Not yet registered as a developer on Apple.)

+4
source share
1 answer

This issue is currently assigned to the 4-milestone, which is scheduled for March 2018, so this problem needs to be resolved before that.

0
source

Source: https://habr.com/ru/post/1689029/


All Articles