Screenshot

Contents

Captures a screen shot

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

联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

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

ionic cordova plugin add com.darktalker.cordova.screenshot npm install @ionic-native/screenshot
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/screenshot

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

  • Android
  • iOS
  • macOS

Ionic 捕捉屏幕截图 Screenshot插件的用法(Usage)

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