Skip to content

device-screenshot

Photographs the DEVICE, not the web page.

captureObsidianScreenshot goes through Appium in the WebView context, so on Android it captures the page: no status bar, and — the reason this exists — no soft keyboard, because the IME is a system window and not part of the page. A frame that is meant to show what a phone looks like therefore cannot be taken that way.

adb exec-out screencap -p reads the framebuffer instead, which is the same route the trusted-input passes already use. The trade is deliberate and worth writing down at every call site: a device capture carries the status-bar clock and battery, so it is not byte-reproducible the way a page capture is. Reach for this only for the shots that need the keyboard; leave the rest on captureObsidianScreenshot.

InterfaceDescription
CaptureDeviceScreenshotParamsParameters for captureDeviceScreenshot.
FunctionDescription
captureDeviceScreenshotCaptures the device’s framebuffer as a PNG.