The application is a questionnaire that at the end clicks a button and it closes, or hides (since it keeps running in the background) and must make a screenshot 3 seconds after it has been closed.
I have tried to search everywhere and I have not been able to solve this problem.
Thank you in advance! (app created in AndroidStudio)