I am looking for a universal solution to detect a screenshot when it is taken and retrieve the path/filename to the image. I started with the FileObserver
object and it seemed like it might work, however, I could not find a reliable way to get the user's screenshot directory (As it could be different between devices). I even had trouble hardcoding the path to the screenshots based on my test device.
I also stumbled across this library, but it seemed to take the same approach which did not work on the devices I tested on (Nexus5X, LG G4 - both running Marshmallow).
Thank you