简体   繁体   English

没有布局根视图的android屏幕截图

[英]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. 实际上,在android手机中,当我们同时按下主屏幕按钮和侧面按钮时,我们可以进行屏幕截图。 which event is running at the time of pressing? 按下时正在运行哪个事件?
In the camera event we fire android.provider.MediaStore.ACTION_IMAGE_CAPTURE. 在相机事件中,我们触发android.provider.MediaStore.ACTION_IMAGE_CAPTURE。

Posts about how to make a screenshot: 有关如何制作屏幕截图的信息:
This: screenshot in android 这: Android中的屏幕截图
or this: How to programmatically take a screenshot in Android? 或这样: 如何在Android中以编程方式拍摄屏幕截图?
or maybe this: https://stackoverflow.com/a/10482368/1164919 或者也许是这样: 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. 似乎有一个从android 4.0开始运行的专用服务,该服务可通过您在此处提到的方式来帮助截取屏幕截图。

But I am not aware of how it happens in the previous versions of android. 但是我不知道它在以前的android版本中是如何发生的。

Here is a link to the Service TakeScreenshotService . 这是服务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. 这是指向GlobalScreenshot类的链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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