Socket
Socket
Sign inDemoInstall

react-native-lewin-screen-capture

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-lewin-screen-capture

获取系统截屏事件与获取当前屏幕截屏


Version published
Weekly downloads
134
increased by10.74%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-lewin-screen-capture

react-native 获取系统截屏通知并获取图片/截取当前屏幕

Table of contents

  • Install
  • Usage

Install

1: yarn add 或者npm install,现在最新版本是1.0.0

yarn add react-native-lewin-screen-capture

2: yarn install 或 npm install

Usage

NOTE: 可以参考Example的App.js中的方法

import ScreenCaptureUtil from 'react-native-lewin-screen-capture'

// 开始监听
ScreenCaptureUtil.startListener(res=>{
            console.log(res)
            // this.setState({uri:'data:image/png;base64,' + res.base64})
            this.setState({uri: res.uri})
          })
// 停止监听
ScreenCaptureUtil.stopListener()
// 截取当前屏幕
ScreenCaptureUtil.screenCapture((res)=>{
            console.log(res)
            this.setState({uri: res.uri})
          })
// 清理缓存
ScreenCaptureUtil.clearCache()

Keywords

FAQs

Last updated on 31 Oct 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc