0

I have requirement that whenever use capture screenshot from any external or internal app then user should notify that screenshot has been captured. For that i came to know that i can use FileObserver.

Okay, So i can do that. But my questions are:

  1. How to access Screenshots folder for different devices?

Because some devices contain in DCIM folder and some devices with Pictures folder and for other devices actually i don't know.

  1. Do I need to use FileObserver in activity class or should i use background service and put FileObserver in that service class?

Thank you in advance!

  • Does this answer your question? [Path to screenshots in Android](https://stackoverflow.com/questions/9667297/path-to-screenshots-in-android) – Kanzariya Hitesh Dec 13 '19 at 11:16
  • "I have requirement that whenever use capture screenshot from any external or internal app then user should notify that screenshot has been captured." -- I do not know what an "external... app" is. However, your app has no reliable way to find out about screenshots. "For that i came to know that i can use FileObserver" -- your approach will not work on Android 10+. It also assumes that the screenshot is stored somewhere on the filesystem that your app can access, and there is no guarantee of that. For example, the screenshot might be sent directly to a Web server. – CommonsWare Dec 13 '19 at 13:02

0 Answers0