API: Capture Screenshots & Signatures
Allows you to capture a screenshot of the current view of the screen and to save it locally as an image file. Signatures can also be captured by creating an HTML5 canvas for drawing on-screen via touch, then capturing the result.
Resulting files can be accessed directly on the device by a locally stored HTML page, manually transferred to a computer, or retrieved remotely through Dropbox Sync. Files can also be managed using the Manage Local Files API.
- Sample code to run within the app and download for integration into your own project is available here.
- App Settings
- Storage of resulting files in Kiosk Pro's Documents folder
- Due to sandboxing in iOS/iPadOS, Kiosk Pro is unable to store local files outside of its own Documents folder.
Triggers via API Functions
This function triggers a screen capture and saves the result in the local Kiosk Pro documents folder. As this results in an image file, the result can also be translated into a Base64 text string for upload to a database.
The sample code also shows an example of creating an HTML5 canvas for drawing a signature on-screen by touch - the result can then be captured by this call.
saveScreenToPng(filename, x-axis, y-axis, width, height, callback);
|Callback return values||success - if defined, the function successfully captured and saved an image to the Kiosk Pro document's folder.|
- Added in version 1.3