I am looking for a universal solution for detecting a screenshot when taking it and getting the path / file name to the image. I started with an object FileObserver, and it seemed to me that this might work, but I could not find a reliable way to get a custom screenshot (since it may differ from devices). I even had a problem with hard-coding the path to screenshots based on my test device.
I also stumbled upon this library , but it looks like it used the same approach that did not work on the tested devices (Nexus5X, LG G4 - both work with Marshmallow).
thank
source
share