以当前的屏幕截图截图、屏幕

2023-09-06 02:52:59 作者:酒醉人不归

我的工作在Android上的应用程序,这将共享屏幕到另一个机器人device.This应用程序会在后台作为服务运行。

I am working on an application on Android which will share the screen to another android device.This app will run in background as service.

我想捕捉的画面(当前画面),将其保存为JPEG和continously它通过UDP发送到其他Android设备。

I want to capture the screen (current screen),save it as JPEG and continously send it over UDP to other Android device.

但我的问题是如何通过捕获帧缓冲区捕捉当前画面。

But my problem is how to capture the current screen by capturing framebuffer .

请帮忙。

推荐答案

您可以通过启用采取的布局截图

You can take the screenshot of a layout by enabling

setDrawingCacheEnabled(true);

视图。

勾选此链接