{"id":20045627,"url":"https://github.com/lewinjun/react-native-lewin-screen-capture","last_synced_at":"2025-05-05T09:30:56.974Z","repository":{"id":33154793,"uuid":"152549840","full_name":"LewinJun/react-native-lewin-screen-capture","owner":"LewinJun","description":"获取系统截屏事件 react native","archived":false,"fork":false,"pushed_at":"2023-05-12T06:50:18.000Z","size":2194,"stargazers_count":22,"open_issues_count":12,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T06:37:07.231Z","etag":null,"topics":["reactnative","screencapture","screenhot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LewinJun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-11T07:30:26.000Z","updated_at":"2024-05-27T02:58:34.000Z","dependencies_parsed_at":"2024-06-21T20:18:16.938Z","dependency_job_id":"f9c79680-4ecf-40af-b044-1d53ccb83a69","html_url":"https://github.com/LewinJun/react-native-lewin-screen-capture","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":0.24,"last_synced_commit":"425218b55c879ff4ed06688e7574e13e3a859b48"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewinJun%2Freact-native-lewin-screen-capture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewinJun%2Freact-native-lewin-screen-capture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewinJun%2Freact-native-lewin-screen-capture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LewinJun%2Freact-native-lewin-screen-capture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LewinJun","download_url":"https://codeload.github.com/LewinJun/react-native-lewin-screen-capture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252471340,"owners_count":21753150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["reactnative","screencapture","screenhot"],"created_at":"2024-11-13T11:18:17.568Z","updated_at":"2025-05-05T09:30:56.443Z","avatar_url":"https://github.com/LewinJun.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-lewin-screen-capture\nreact-native 获取系统截屏通知并获取图片/截取当前屏幕\n\n## Table of contents\n- [Install](#install)\n- [Usage](#usage)\n\n## Install\n### 1: yarn add 或者npm install,现在最新版本是1.1.0 支持0.6X版本 androidx\n`yarn add react-native-lewin-screen-capture  `\n### 2: yarn install 或 npm install\n### 3: react-native link react-native-lewin-screen-capture\n\n## Usage\n### NOTE: 可以参考Example的App.js中的方法\n\n```javascript\nimport ScreenCaptureUtil from 'react-native-lewin-screen-capture'\n\n// 开始监听\nScreenCaptureUtil.startListener(res=\u003e{\n            console.log(res)\n            // this.setState({uri:'data:image/png;base64,' + res.base64})\n            this.setState({uri: res.uri})\n          }, '截屏,screen')\n// 停止监听\nScreenCaptureUtil.stopListener()\n// 截取当前屏幕\nScreenCaptureUtil.screenCapture((res)=\u003e{\n            console.log(res)\n            this.setState({uri: res.uri})\n          })\n// 清理缓存\nScreenCaptureUtil.clearCache()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewinjun%2Freact-native-lewin-screen-capture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flewinjun%2Freact-native-lewin-screen-capture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewinjun%2Freact-native-lewin-screen-capture/lists"}