There is running 3rd party app, random text appears every minute on screen. I need to quickly copy text, immediately after it appeared. root, xposed and etc. are provided.
It is not stated which Android version or device. So, assumption is that the app is user friendly.
When the text appear, long press on the text until the edit text context menu appears. Choose select all, then choose copy. Can be done under 6 seconds.
Later you can paste and edit the text required.