Screenshot

Improve this doc

$ ionic plugin add https://github.com/gitawego/cordova-screenshot.git
$ npm install --save @ionic-native/screenshot

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

Captures a screen shot

Usage

import { Screenshot } from '@ionic-native/screenshot';

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);

Instance Members

save(format., quality., filename.)

Takes screenshot and saves the image

Param Type Details
format. string

Format can take the value of either 'jpg' or 'png' On ios, only 'jpg' format is supported

quality. number

Determines the quality of the screenshot. Default quality is set to 100.

filename. string

Name of the file as stored on the storage

Returns: Promise<any>

URI(quality.)

Takes screenshot and returns the image as an URI

Param Type Details
quality. number

Determines the quality of the screenshot. Default quality is set to 100.

Returns: Promise<any>

API

Native

General