I\'ve written an IME (InputMethodService) and I need to get all the text from the EditText it is editing. I know one way:
InputConnection inputConnection = getCu
My solution is to use getExtractedText(). I am not sure if this has some limitations, but has worked for me so far.
CharSequence currentText = inputConnection.getExtractedText(new ExtractedTextRequest(), 0).text;
Here is also another way to do it:
inputConnection.performContextMenuAction(android.R.id.selectAll);
CharSequence sData = inputConnection.getSelectedText(0);