Grabbing a screenshot programmatically in webos

我只是一个虾纸丫 提交于 2019-12-24 04:07:23

问题


Is there any way to grab a screenshot of the currently active screen in webos programmatically?

The use-case is an app that takes a screen shot every few seconds for recording user activity.

EDIT: I'm interested in code that actually runs on the device.


回答1:


There's a private service bus API to grab a screenshot that you can use from the shell via luna-send:

luna-send -n 1 luna://com.palm.systemmanager/takeScreenShot '{"file":"sshot.png"}'

This won't work from a non-com.palm application, so it's possible to do this in homebrew, but not in a catalog app.



来源:https://stackoverflow.com/questions/6419662/grabbing-a-screenshot-programmatically-in-webos

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!