I have my own custom keyboard so using the keyboard's inputs method I am getting a whole text from edit text whether it is from my own app or even from a third-party app. Everything working properly expects all Microsoft applications. They provide me only just limited character text. So how do I achieve this in Ms apps too? This is my code to get a text through the keyboard.
ExtractedTextRequest extractedTextRequest = new ExtractedTextRequest();
ExtractedText extractedText = getCurrentInputConnection().getExtractedText(extractedTextRequest, 0);
wordReadAloud = ((String) extractedText.text);
CharSequence textBeforeCursor = getCurrentInputConnection().getTextBeforeCursor(wordReadAloud.length(), 0);
you can send using these code please vote after solve your issue