Is there any way to get some data from the screen running the application in the background?

Hi, I’m making an app, where, when clicking on an X button, it will be in the background and get information from the screen, another option to do that too, would be to let the user send a print of the necessary screen and try to make it analyze it