Interface IScreenshotManager
interface IScreenshotManager
Extends com.amazon.apmf.IStandard
IScreenshotManager provides function about screenshot, IWindow which set secure state true cannot be
taken for screenshot. We use same object to implement both IDisplay and IScreenshotManager. Client can
call tryQueryInterface to get screenshot manger from IDisplay.
Methods
requestScreenShot()
Initiates request for screen capture and generates the next screenshot. Captures the current screen content and processes it for client usei32requestScreenShot(com.amazon.kepler.buffer.IBufferGroup*buffer)
Parameters
buffer
com.amazon.kepler.buffer.IBufferGroup* — Required
The client-provided buffer where screenshot content will be stored.
Buffer format compatibility can be verified using [IDisplay2#isBufferFormatSupportedWithMimeType]
Returns
i32
a unique request identifier that can be used to track the screenshot
status through [IScreenShotListener#onScreenShot]
Throws
NullPointerError— if any input argument is null pointer while a non-null one is expectedInvalidArgumentError— if any input argument is invalidSecurityError— if current process does not have screenshot privileges to use screenshot manager. This API needs client having privilegecom.amazon.graphics.privilege.screenshot
addScreenShotListener()
Registers a listener to receive screenshot capture events. Adds a new listener that will receive notifications about screenshot operations. The listener must implement the IScreenShotListener interface to handle screenshot event Add IScreenShotListener.com.amazon.apmf.ISubscription*addScreenShotListener(IScreenShotListener*listener)
Parameters
listener
IScreenShotListener* — Required
Instance to an IScreenShotListener implementation that will receive
screenshot event callbacks.
Returns
com.amazon.apmf.ISubscription*
An ISubscription object that can be used to manage the listener’s lifecycle.
The listener will continue receiving events until explicitly unsubscribed.
Throws
DeviceError— if IScreenshotManager is not in valid stateNullPointerError— if any input argument is null pointer while a non-null one is expected

