I'm trying to make an application that remains running in the background, ready to take a screenshot. But I don't know how to make it take the screenshot at the moment I need it. On my Motorola, I just have to put 3 fingers on the screen to take a screenshot, but I can't do that on my tv box. I've tried a couple of applications from Google Play, but they didn't work, so I thought, if it wasn't too difficult, I could create my own screenshot application. I already got the code from another post, which works. But I don't know how, being in an application that runs in the foreground, to make the one that takes the screenshot run at the moment I want it to.