0

I've been trying to research for days now on how I can develop an Android application written in Kotlin that will take a screenshot of anything that is on the device's screen that is external from the application that I am developing. The only stuff I can find are tutorials and libraries that will take a screenshot of the application activity. That's not what I want. So, basically the screenshot from my app should have the same result as if the user pressed and held down the power and volume down buttons to take a screenshot. My idea with this is to have my application create a local notification channel, and then the user can pull down their notification panel, and press the action button "Take Screenshot" on my app's notification to take a picture/scan whatever is on their device's screen. Maybe I am not using the right keywords when researching the internet. What keywords should I be using to look this up? I appreciate the help! Thanks!

Added Note: I am not interested in rooting my device to accomplish this task.

Mitavo
  • 3
  • 2
  • [Is this what you're looking for?](https://stackoverflow.com/q/12462944/6395627) – Slaw Mar 06 '23 at 06:50
  • I am looking for whatever that will help me figure out how to take screenshots of anything that is on the user's device screen. This could be facebook, Google Chrome Browser, Snapchat, Instagram, any app that is on their screen. This also includes the desktop of their device if that is the top screen. When I have my app create a local notification channel, that channel will pop up on that device as a notification. When the user opens the notification, one of the actions buttons will be titled "Take Screenshot" the broadcast receiver will take a screenshot of whatever is on their screen. – Mitavo Mar 06 '23 at 07:08
  • Then result will send to my application and it will appear in a ImageView. – Mitavo Mar 06 '23 at 07:08
  • I hope that I am making sense? – Mitavo Mar 06 '23 at 07:10
  • Then please read the Q&A I linked. It seems to tell you how to do that (specifically _without_ rooting the device). Otherwise, please explain how the other Q&A doesn't help. – Slaw Mar 06 '23 at 07:16
  • See: [Record from a from a background-service using MediaProjection API: is this kind of approach the only one possible?](https://stackoverflow.com/q/69532198/295004) – Morrison Chang Mar 06 '23 at 10:47

0 Answers0