Skip to main content

Screenshot

Captures a screen shot

https://github.com/gitawego/cordova-screenshot

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Installation#

$ npm install com.darktalker.cordova.screenshot
$ npm install @ionic-native/screenshot
$ ionic cap sync

Supported Platforms#

  • Android
  • iOS
  • macOS

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

import { Screenshot } from '@ionic-native/screenshot/ngx';
constructor(private screenshot: Screenshot) { }
...
// Take a screenshot and save to file
this.screenshot.save('jpg', 80, 'myscreenshot.jpg').then(onSuccess, onError);
// Take a screenshot and get temporary file URI
this.screenshot.URI(80).then(onSuccess, onError);