简体   繁体   中英

android screen capture without layout root view

Actually in android mobiles when we press the home button and the side button at a time we can make a screenshot. which event is running at the time of pressing?
In the camera event we fire android.provider.MediaStore.ACTION_IMAGE_CAPTURE.

Posts about how to make a screenshot:
This: screenshot in android
or this: How to programmatically take a screenshot in Android?
or maybe this: https://stackoverflow.com/a/10482368/1164919

But i did not find anything about some kind of provider as you describe in your post.

It looks like there is a dedicated service running from android 4.0 and up which helps to take screenshots by the way you have mentioned here.

But I am not aware of how it happens in the previous versions of android.

Here is a link to the Service TakeScreenshotService . When you look into it you will be able to see another class which actually is responsible for capturing the Screenshot and storing it. And here is the link to the class GlobalScreenshot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM