Search code examples
webos

Grabbing a screenshot programmatically in webos


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.


Solution

  • 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.