Capture high-resolution native bitmap screenshots of the current web view canvas and trigger instant sharing.
Capture high-resolution native screenshots of the current web view canvas. Nativine embeds native iOS drawViewHierarchyInRect and Android PixelCopy / Bitmap screenshot engines, enabling 1-tap receipt generation, ticket sharing, and visual bug reporting.
HTML5 canvas screenshot libraries (like html2canvas) fail on complex CSS grids, cross-origin images, and custom fonts. Nativine's Native Web Screenshot plugin renders GPU-accelerated bitmap captures at full device resolution:
To capture a screenshot of the active web view from JavaScript, call nativine.screenshot.capture():
nativine.screenshot.capture({
quality: 0.9,
format: 'png',
shareImmediately: true,
callback: 'onScreenshotCaptured'
});
function onScreenshotCaptured(result) {
console.log("Local Image File URI:", result.fileUri);
console.log("Base64 Image Data:", result.base64Data);
}
| Parameter | Type | Description |
|---|---|---|
format | string | Optional. Image output format (png or jpg, default: png). |
shareImmediately | boolean | Optional. Set true to pop native OS Share Sheet automatically. |
Yes. If Secure Window flag (FLAG_SECURE) is active, screenshot capture returns an error to protect sensitive financial data.
Yes. Pass fullPage: true to render the entire scrollable height of the web page into a single long image.