I want to take a screenshot of an Activity
of my application, but I do not have the code of that activity (only its class file since it is imported from an external API) so am not able to modify the UI and add an event which will help me taking the screenshot.
Thus, I thought about using a background Service
which can detect all application's activities and to take the screenshot if matching the wanted activity with some condition.
I have browsed many question/answers about the subject, but nothing matched what I want to do.
So, I will be very grateful for any help, or suggestion about this.
Thank you.