Screenshot

Contents

Captures a screen shot

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

Ionic 捕捉屏幕截图 Screenshot插件的安装(Installation)

ionic cordova plugin add com.darktalker.cordova.screenshot npm install @ionic-native/screenshot

Ionic 捕捉屏幕截图 Screenshot插件支持的平台(Supported Platforms)

  • Android
  • iOS
  • macOS

Ionic 捕捉屏幕截图 Screenshot插件的用法(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);